Skip to main content
Arduino

Timeline for What is wrong with my state machines?

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Feb 6, 2018 at 8:40 history bumped Community Bot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jan 5, 2018 at 19:18 history edited Husna Amiliansyah CC BY-SA 3.0
added 9600 characters in body
Jan 5, 2018 at 15:46 answer added Code Gorilla timeline score: 1
Jan 5, 2018 at 15:05 comment added Code Gorilla You could refactor this code and make it much easier to debug. Each case could be reduced to a 5 element structure {IN1State, IN2State, EnableA, EnableB, StateGArage}. garageClosed could be replaced with two extra StateGarage_ entries Opened and Closed.
Jan 5, 2018 at 10:06 history edited dda CC BY-SA 3.0
deleted 471 characters in body; edited title
Jan 5, 2018 at 8:58 comment added Husna Amiliansyah what is the problem with 'StateGate_Open'? do i need to create 'boolean openGate'?
Jan 5, 2018 at 8:55 comment added Husna Amiliansyah for state 'StateGarage_Alarm', i've been doubting where should connect it to, and thought that with 'if' function it can be worked, so is it better to connect it to 'StateGate_Open' or 'StateGate_Closing' ?
Jan 5, 2018 at 8:42 comment added jsotola the StateGate_Open is actually the problem with the code
Jan 5, 2018 at 8:36 comment added jsotola you check for state StateGarage_Alarm, but you have no command that actually causes the state machine to enter that state. .... your state machine has some questionable functionality ... the StateGate_Opening state code sets the state to StateGate_Open without checking if the gate actually opened. ... similar thing is being repeated in other parts of the code
Jan 5, 2018 at 7:50 history asked Husna Amiliansyah CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /