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^bR^bR^bR^bR^bR^bR^bER ^bC/ ER^bER^
bER^bER^bER^bER^jbER^EbER^bER	^nbER
^bER^bER^bER^bER^bER^bER^SbER^TbC/ ER^UbER^RbER^QbER^PbER^HbER^bER^bER^bER^ybER^!bER^AbER^bER^^bER^jbER ^bER!^kbER"^bC/ ER#^bER$^pbER%^bER&^bER'^bER(^bER)^bER*^bER+^bER,^bER-^bER.^ bER/^ bER0^bER1^2bER2^bER3^bCER4^ER5^ER6^ER7^ER8^gER9^ER:^F/CtER;]ER<&   ERD^ERE^HERF^lERG^n/tER=]ER>&    ! ER? ER@]4      tERHERB ERC llt	ERA# (I  a8  Numeric codes for Roboteq serial command constants (the `_XXX` names
used as the first argument to GetValue/SetCommand/GetConfig/SetConfig).

Two tiers of confidence here:

1. **Bytecode-confirmed** (the highest bar): decoded directly from real
   RoborunPlus-compiled `.hex` output.

       _VAR      = 6   (batch 4, GetValue and SetCommand)
       _ALIM     = 42 (0x2A)  (batch 4, GetConfig/SetConfig)
       _MS       = 16 (0x10)  (batch 6, SetCommand)
       _GO       = 0          (batch 6, SetCommand)
       _ESTOP    = 14 (0x0E)  (batch 6, SetCommand)
       _AI       = 16 (0x10)  (batch 6, GetValue)
       _BATAMPS  = 12 (0x0C)  (batch 6, GetValue)
       _MOTAMPS  = 0           (batch 6, GetValue)
       _MOTPWR   = 2           (batch 6, GetValue)
       _V        = 13 (0x0D)  (batch 6, GetValue)

2. **Manual-sourced** (everything else below): read directly from the
   "HexCode:" field documented for each command/query/config parameter in
   *Roboteq Controllers User Manual*, V2.1. All 10 bytecode-confirmed values
   above also appear in the manual and match exactly -- strong evidence the
   manual's HexCode field is what actually goes on the wire, so the other
   ~300 values it documents are trusted here even though they haven't each
   been individually diffed against a compiled `.hex` file.

Extraction notes (see `docs/reverse_engineering.md` for the full writeup):

- A handful of aliases were dropped because the manual itself has
  copy-paste errors: some later sections reuse an earlier section's
  `Syntax Scripting` example without updating the `_XXX` name to match that
  section's own declared alias (e.g. the `CU` command's example says
  `setcommand(_CS, ...)` -- copied from the preceding `CS` section and never
  fixed). Where a section's own alias doesn't match the `_XXX` name in its
  own example, that example was discarded rather than trusted.
- The DS402 (CANopen motion-profile) command/query sections were excluded
  entirely. That's a separate operating profile from plain serial
  MicroBasic scripting and several of its aliases collide with unrelated
  classic-mode codes for the same short name (e.g. a DS402-only `MOTVEL`
  variant using a different HexCode than the classic `S` command's
  `_MOTVEL`) -- since a MicroBasic script on this hardware isn't running in
  DS402 mode, the classic definition is what applies, and the DS402
  duplicate would just be wrong here.
- `_BRUN` and `_CSS` (and only these two, once the above two rules are
  applied) turned out to genuinely mean different things depending on the
  verb: `_BRUN` is HexCode `0x0C` as a `SetCommand` (start/stop/restart the
  running script) but `0x48` as a `SetConfig` (enable auto-start on power
  up) -- two unrelated parameters that happen to share an alias. `_CSS` is
  `0x6C` to `SetCommand` (load an SSI counter) and `0x6E` to `GetValue`
  (read it back) -- related but still separately numbered. These are
  handled by `VERB_SPECIFIC_CODES` below and checked before the flat table.

Command names are matched case-insensitively, without the leading
underscore (the parser strips it before lookup).
)annotationsaabcntrabspeedacaccelacsactradbaiaicainaalimalinamaxamaxaaminaminaamodamsanainanaincangapolasiatgaatgdatrigaxbbabadjbadvbatampsbdtbeccbeebfbkbhlbhlabhomebhvbindbkdblcntrblfbbllbllablrspeedblspeedblstdbmcbmfbmodbndboolbpolbprbrvbsbscbsrbzpwccalivecancangocansendcascbcbrcdcencfcgchbchlachsciacipcisclclerdclinclsncmdanacmdplscmdsercnodcpricrcscsrcsrtctpscttdd0d1dcddtdeceldfcdhcpdidigindigoutdindinadinldmoddodoadoldoutdpadrdreacheddresdsdsetdxeechofedeceeeeseesavehlehlaehomeellellaemodepprestopexffcfeedbkfffidfinfltflagflwfmfsfsaggidgiqgogwahhomehpohshsathsensehsmicapiclillrilmipaippirrismkkdgkifkigkpfkpgldlklockedlperrlqmmamacmdalmdecmdirmemsmgmgdmgdetmgmmgmrkrmgomgsmgstatusmgtmgtrackmgymgyromlxmmodmnodmnrpmmotampsmotcmdmotflagmotposmotpwrmotvelmposrelmpwmsmstopmvelmxmdmxpfmxprmxrpmmxsmxtrnnxtaccnxtdecnxtposnxtposrnxtvelotlovhovlppctrpdbpdnsphapipicpinaplinplsinplsincpmaxpmaxapminpminapmodpmsppolprprxpsapxrrcrcoutrelcntrrelspeedrfcrsrs485rsbrrwdssblcntrsbmsccscprsdnssecsedsencntrshlshlashomeskctrskdbsklinskmaxskminskuseslsllsllasmodsnaspektrumspolsrsrossssfssrstflagstosttsvtswdsxttemptidtimetmtnmtrtracktrnuiduvlvvarvkvoltsvphwmodzsmazsmczdict[str, int]COMMAND_CODESzdict[tuple[str, str], int]VERB_SPECIFIC_CODESc                  .   a  ] tR tRtR V 3R lltRtV ;t# )UnknownCommandErrori  c                   V ^8  d   QhRR/# )   namestr )formats   "n\\thalassa.shore.mbari.org\ProjectLibrary\ESP\FIDO\PumpController\compiler\src\microbasic_compiler\commands.py__annotate__ UnknownCommandError.__annotate__  s      S     c                	Z   < \         SV `  R V R\        \        4       R24       Wn        R# )z#Unknown Roboteq command constant '_z'. See commands.py (z& known constants) for how to add more.N)super__init__lenr<  rB  )selfrB  	__class__s   &&rF  rL  UnknownCommandError.__init__  s7    1$ 8M"##IK	
 	rI  )rB  )__name__
__module____qualname____firstlineno__rL  __static_attributes____classcell__)rO  s   @rF  r?  r?    s     rI  r?  Nc               $    V ^8  d   QhRRRRRR/# )rA  rB  rC  verbz
str | NonereturnintrD  )rE  s   "rF  rG  rG    s!      s *  rI  c                    V P                  R4      P                  4       pVe   W!3\        9   d   \        W!3,          # V\        9  d   \	        V4      h\        V,          # )a.  name includes the leading underscore, e.g. '_ALIM'.

verb, when given, is the lowercase device-I/O function name the
constant is being passed to ('getvalue', 'setcommand', 'getconfig',
'setconfig') -- only relevant for the handful of aliases in
VERB_SPECIFIC_CODES that mean different things per verb.
_)lstriplowerr=  r<  r?  )rB  rX  keys   && rF  resolve_command_coder`    sV     ++c

 
 
"CSK+>>"C;//
-!#&&rI  )brun
setcommand)ra  	setconfig)cssrb  )rd  getvalue)N)
__conditional_annotations____doc__
__future__r   r<  __annotations__r=  	Exceptionr?  r`  )rf  s   @rF  <module>rk     s7  7r #z!z!az! qz! 	!	z!
 Qz! 
2z! Bz! 
2z! 	"z! 
2z! Bz! Bz! Bz! Bz! Rz!  B!z!" R#z!$ B%z!& 
2'z!( R)z!* b+z!, 
2-z!. B/z!0 
21z!2 B3z!4 B5z!6 R7z!8 	"9z!: ;z!< 	"=z!> B?z!@ BAz!B rCz!D 
3Ez!F CGz!H 
3Iz!J BKz!L 
2Mz!N BOz!P RQz!R 
3Sz!T BUz!V 
1Wz!X aYz!Z B[z!\ 
2]z!^ B_z!` az!b rcz!d Rez!f 
2gz!h 
2iz!j Bkz!l 
2mz!n Boz!p Bqz!r 
3sz!t 
3uz!v 	"wz!x 
2yz!z 
2{z!| B}z!~ z!@ bAz!B 
2Cz!D REz!F rGz!H 
2Iz!J 	!Kz!L 
2Mz!N 	#Oz!P 
2Qz!R 	"Sz!T 	"Uz!V 
2Wz!X CYz!Z 
3[z!\ 
2]z!^ 
2_z!` 
2az!b 	"cz!d Rez!f Bgz!h Biz!j bkz!l bmz!n boz!p Bqz!r Asz!t 	!uz!v 	"wz!x 
3yz!z B{z!| B}z!~ 
3z!@ Az!B 	!Cz!D 	"Ez!F 	!Gz!H 
3Iz!J QKz!L 
2Mz!N COz!P 	"Qz!R RSz!T bUz!V 
2Wz!X BYz!Z B[z!\ C]z!^ 	"_z!` 
2az!b 
2cz!d Aez!f 
3gz!h 	"iz!j kz!l Amz!n 	!oz!p Bqz!r 	"sz!t uz!v Qwz!x Cyz!z 	!{z!| 
2}z!~ Rz!@ 
2Az!B BCz!D REz!F 
2Gz!H BIz!J BKz!L BMz!N ROz!P 	"Qz!R Sz!T 	"Uz!V bWz!X 	"Yz!Z 
2[z!\ 
2]z!^ r_z!` 
3az!b 	"cz!d 	"ez!f 
3gz!h iz!j 
3kz!l 
3mz!n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