Skip to content

Commit

Permalink
BUGFIX correct DetectMode in steering 2wheel code
Browse files Browse the repository at this point in the history
  • Loading branch information
ironsheep committed Aug 11, 2023
1 parent 8081f9a commit 5749e33
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ demo_single_motor (DESKTOP-QL1K6HH's conflicted copy 2022-02-21).spin2
isp_bldc_motor-OLD.spin2
isp_bldc_motor-REF.spin2
test_angle.spin2
angleTest.spin2
REF/
*.txt


# VSCode objects to ignore
Expand Down
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.history": true,
"**/*.txt": true
},
"explorerExclude.backup": {}
}
6 changes: 3 additions & 3 deletions src/demo_dual_motor_hdmi.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ CON { fixed io pins }

OBJ { our Drive Subsystem }

user : "isp_bldc_motor_userconfig" ' driver configuration
wheels : "isp_steering_2wheel" ' the dual-drive BLDC motors
tvDebug : "isp_hdmi_debug" ' HDMI debug object
user : "isp_bldc_motor_userconfig" ' driver configuration
wheels : "isp_steering_2wheel" ' the dual-drive BLDC motors
tvDebug : "isp_hdmi_debug" ' HDMI debug object

DAT { run-time condition vars }

Expand Down
1 change: 1 addition & 0 deletions src/isp_bldc_motor.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ PUB validBasePinForChoice(userBasePin) : legalBasePin
PINS_P32_P47 :
OTHER :
legalBasePin := INVALID_PIN_BASE
debug("*VAL* ", sdec_long(legalBasePin))

PUB validVoltageForChoice(userVoltage) : legalVoltage
'' VALIDATE users' voltage choice returns legalVoltage or INVALID_VOLTAGE
Expand Down
2 changes: 1 addition & 1 deletion src/isp_steering_2wheel.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ PUB validMotorForChoice(userMotor) : legalMotor

PUB validDetectModeForChoice(userDetMode) : legalMode
'' VALIDATE users' detection mode choice returns legalMode or INVALID_DET_MODE
legalMode := ltWheel.validMotorForChoice(userDetMode)
legalMode := ltWheel.validDetectModeForChoice(userDetMode)

CON { --- PRIVATE Utility Methods --- }

Expand Down
2 changes: 1 addition & 1 deletion src/test_new_ramps.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ OBJ { our Motor(s) }
user : "isp_bldc_motor_userconfig" ' driver configuration
'tvDebug : "isp_hdmi_debug" ' the single BLDC motor
'wheel : "isp_bldc_motor" ' the single BLDC motor

distConv : "isp_dist_utils" ' distance conversion utils

CON { driver interface Constants}
Expand All @@ -48,7 +49,6 @@ CON { driver interface Constants}
' DCS_SLOW_TO_CHG - motor is slowing down to change direction, then will be SPEEDING_UP
' DCS_FAULTED - motor faulted (couldn't drive to requested speed)
' DCS_ESTOP - motor in emergency stop (external stop requested)
'
#0, DCS_Unknown, DCS_STOPPED, DCS_SPIN_UP, DCS_AT_SPEED, DCS_SPIN_DN, DCS_SLOW_TO_CHG, DCS_FAULTED, DCS_ESTOP

DAT
Expand Down

0 comments on commit 5749e33

Please sign in to comment.