WARNING:
JavaScript is turned OFF. None of the links on this concept map will
work until it is reactivated.
If you need help turning JavaScript On, click here.
This Concept Map, created with IHMC CmapTools, has information related to: Buttons_State_Diagram, cnt-TimeChanged[Button] > ClickTime condition action timed out no release, Pressed_1 condition action timed out no release, Local Data MaxButton long 0 ' Number of buttons to scan ButtPins long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 BouncButton long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 DBounButton long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 LDBouButton long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 TimeChanged long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 StateButton long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 LocCmd long 0 EncState long 0 NxtState long 0 Button long 0 ButtonPin long 0 ButtChgd long 0 Count long 0 PinA long 0 PinB long 0, handle quadrature encoder write counter to hub, QSButtons variant Version for the Quick-Start Board, ReleasedClick condition action long[ButtClckPtr][Button] := True, case LocCmd ' switch-case statement; execute appropriate action based on local command) run:, ReleasedClick condition action Passive, case LocCmd ' switch-case statement; execute appropriate action based on local command) Idle: ' case Idle) Idle (has to be recognized in Idle state too) Long[CommandPtr] := 0 ' confirm that is command in idle state =0 i.e. cog is running), State: 01 count-- State: 00, ButtChgd condition action ButtChgd := False long[ButtDClkPtr][Button] := True, BouncButton[Button] += (ina[ButtonPin]<ə -1) * ButtPressed incr/decrement bounce-counter, run: handle quadrature encoder, BouncButton[Button] := TimeDebou <# (0 #> BouncButton[Button]) limit bounce counter, QuickStart Button Leds back Link, cnt - TimeChanged[Button] > ClickTime condition action Passive, Long[CommandPtr] := 0 ' Acknowledge command to show process is running Better: return version to allow calling process version check e.g. right number and type of parameters, count := 0 PinA := long [ButtStatPtr] >ɱ PinB := long [ButtStatPtr] & %11111 MaxButton := long [ButtCounPtr] LongFill ( @TimeChanged, cnt, MaxButton) LongFill ( @BouncButton, TimeDebou, MaxButton) repeat Button from 0 to MaxButton-1 ButtPins[Button] := Long[ButtPinsPtr][Button] EncState := ina[PinB]<ə + ina[PinA] ' read encoder pins Long[CommandPtr] := 0 ' Acknowledge command to show process is running, repeat while (LocCmd := Long[CommandPtr]) == 0 ' Wait for new command (create local copy) case LocCmd ' switch-case statement; execute appropriate action based on local command), Pressed condition action Passive