Uploaded March 2026 | Updated September 2026, 4 days ago
Simplifying the state machine, optimizing the code and fixing two bugs …
↓↓↓ Complete description, time index and links below ↓↓↓
Last week we had an overview of the mechanical design – we do want fly-by-wire steering at some point (link below). But it will be a while until we can continue with that. So meanwhile let’s simplify the motor driver beep code detection.
First we simplify the transitions to the error state in our state machine, and I point out a flaw in it. After a reshuffle of the code, which already improves it, we implement the simplification and fix the flaw. Finally, after another bug fix, we do a test.
00:00 Intro – let’s simplify the state machine
01:04 Error transitions – no need to check conditions
03:04 Design flaw – got the timing of the spike wrong
05:14 ISR body – within the class makes it more readable
08:01 Error state – to be set at only one point in the ISR
11:10 Timing fixed – for the spike following the beeps
12:01 Protocol fixed – two bitmasks contained a typo
13:11 Test – anticlimactic as ever, all bugs are gone
14:31 Wrap-up – some more housekeeping to follow, bye
Full Fly-by-Wire Electric Outboard youtube.com/playlist?list=PLwq-2MnM58FKvpYgFXgNCjlKo14L0KI16
Full Fly-by-Wire Electric Outboard (32): Mechanical Design Overview youtu.be/SHTb_NvHvsY
Full Fly-by-Wire Electric Outboard (30): Detection of Motor Driver Beep Codes (2) youtu.be/DIqQNlT_Ylw
Full Fly-by-Wire Electric Outboard (29): Detection of Motor Driver Beep Codes (1) youtu.be/nUMtIUAyg8g
Full Fly-by-Wire Electric Outboard (31): RS-485 Bus Protocol (2) youtu.be/wggQhm7WW8w
Full Fly-by-Wire Electric Outboard (34): Housekeeping (3) youtu.be/-SE-3NRhpGI
#flybywire #electricoutboard #haswing #trollingmotor #outboardmotor #outboard #robertssmorgasbord
Simplifying the state machine, optimizing the code and fixing two bugs …
↓↓↓ Complete description, time index and links below ↓↓↓
Last week we had an overview of the mechanical design – we do want fly-by-wire steering at some point (link below). But it will be a while until we can continue with that. So meanwhile let’s simplify the motor driver beep code detection.
First we simplify the transitions to the error state in our state machine, and I point out a flaw in it. After a reshuffle of the code, which already improves it, we implement the simplification and fix the flaw. Finally, after another bug fix, we do a test.
00:00 Intro – let’s simplify the state machine
01:04 Error transitions – no need to check conditions
03:04 Design flaw – got the timing of the spike wrong
05:14 ISR body – within the class makes it more readable
08:01 Error state – to be set at only one point in the ISR
11:10 Timing fixed – for the spike following the beeps
12:01 Protocol fixed – two bitmasks contained a typo
13:11 Test – anticlimactic as ever, all bugs are gone
14:31 Wrap-up – some more housekeeping to follow, bye
Full Fly-by-Wire Electric Outboard youtube.com/playlist?list=PLwq-2MnM58FKvpYgFXgNCjlKo14L0KI16
Full Fly-by-Wire Electric Outboard (32): Mechanical Design Overview youtu.be/SHTb_NvHvsY
Full Fly-by-Wire Electric Outboard (30): Detection of Motor Driver Beep Codes (2) youtu.be/DIqQNlT_Ylw
Full Fly-by-Wire Electric Outboard (29): Detection of Motor Driver Beep Codes (1) youtu.be/nUMtIUAyg8g
Full Fly-by-Wire Electric Outboard (31): RS-485 Bus Protocol (2) youtu.be/wggQhm7WW8w
Full Fly-by-Wire Electric Outboard (34): Housekeeping (3) youtu.be/-SE-3NRhpGI
#flybywire #electricoutboard #haswing #trollingmotor #outboardmotor #outboard #robertssmorgasbord










