diff --git a/Desktop_Interface/bin/firmware/labrafirm_0005_02.hex b/Desktop_Interface/bin/firmware/labrafirm_0005_02.hex new file mode 100755 index 00000000..ef46552f --- /dev/null +++ b/Desktop_Interface/bin/firmware/labrafirm_0005_02.hex @@ -0,0 +1,706 @@ +:1000000020C100003AC1000038C1000036C1000024 +:1000100034C1000032C100000C94E6080C941609AB +:100020002CC100002AC1000028C1000026C1000028 +:1000300024C1000022C1000020C100001EC1000038 +:100040001CC100001AC1000018C1000016C1000048 +:1000500014C1000012C1000010C100000EC1000058 +:100060000C94130A0C941E0A08C1000006C100007B +:1000700004C1000002C1000000C10000FEC0000079 +:10008000FCC00000FAC00000F8C00000F6C000008C +:10009000F4C00000F2C00000F0C00000EEC000009C +:1000A000ECC00000EAC00000E8C00000E6C00000AC +:1000B000E4C00000E2C00000E0C00000DEC00000BC +:1000C000DCC00000DAC00000D8C00000D6C00000CC +:1000D000D4C00000D2C00000D0C00000CEC00000DC +:1000E000CCC00000CAC00000C8C00000C6C00000EC +:1000F000C4C00000C2C00000C0C00000BEC00000FC +:10010000BCC00000BAC00000B8C00000B6C000000B +:10011000B4C00000B2C00000B0C0000075C4000050 +:10012000ACC00000AAC00000A8C00000A6C000002B +:10013000A4C00000A2C00000A0C000009EC000003B +:100140009CC000009AC0000098C000000C94880970 +:1001500094C0000092C0000090C000008EC000005B +:100160008CC000008AC0000088C0000086C000006B +:1001700084C0000082C0000080C000007EC000007B +:100180007CC000007AC0000078C0000076C000008B +:1001900074C0000072C0000070C000006EC000009B +:1001A0006CC000006AC0000068C0000066C00000AB +:1001B00064C0000062C0000060C000005EC00000BB +:1001C0005CC000005AC0000058C0000056C00000CB +:1001D00054C0000052C0000050C000004EC00000DB +:1001E0004CC000004AC0000048C0000046C00000EB +:1001F00044C000000C94F5130C94A314FD03FF03FA +:10020000010403040504070409040B041D041F046E +:100210002104230425042A0427042904EA0B100CD2 +:10022000370C600C690C6E0CB50CBA0CD90CE00CD8 +:10023000E80C7A0C820C8A0C950C970C990CA10C8A +:10024000AA0C11241FBECFEFCDBFDFE2DEBF10E24C +:10025000A0E0B0E2E8E6FBE202C005900D92AA3908 +:10026000B107D9F72BE2AAE9B0E201C01D92A03E86 +:10027000B207E1F779D20C94B215C2CE84E0809334 +:1002800056008CE189D3809363008BEB80936600EA +:1002900080E88093650081E08093600088ED84BFF2 +:1002A0001092410083E08093500080915100833090 +:1002B000E1F78091500081608093500088E1809345 +:1002C00055008091510080FFFCCF809150008061EB +:1002D000809350008091510084FFFCCF88ED84BF53 +:1002E00084E0809340000895E0E7F0E085818E7F10 +:1002F0008583E0E0FAE08FEB9DE586A397A380EE8F +:100300009EE280A391A382E0808308958091200AD9 +:100310009091210A813E2EE2920718F020918221CD +:1003200006C0803E2EE2920721F020917F2120938B +:100330006A0020910520222321F080910520815020 +:1003400033C0885F9A42813D974080F110929A2095 +:1003500080919B2090919C20A0919D20B0919E2007 +:100360000196A11DB11D80939B2090939C20A0938A +:100370009D20B0939E2080919B2090919C20A091E5 +:100380009D20B0919E20892F9A2FAB2FBB27809361 +:10039000A22180919B2090919C20A0919D20B091C2 +:1003A0009E208093A12186E08093052080910720E4 +:1003B000909108200196B1F4809109208F3F91F02F +:1003C00080910620811106C0809106208150809383 +:1003D00006200895809114019091150180930720C3 +:1003E000909308200895009709F45EC00CF457C05C +:1003F00040E020916B0030E02093802130938121F8 +:1004000020918021309181213695322F22273795F6 +:100410002795209380213093812150916A0020916B +:10042000802130918121250F311D2093802130932F +:1004300081210000209180213091812128173907E6 +:1004400028F410928021109281210895209180211A +:1004500030918121280F391F2115304238F08FEF5C +:100460009FE18093802190938121089520918021A4 +:1004700030918121442329F0A901481B590BCA015D +:1004800002C0820F931F80938021909381218091DD +:100490008021909181218F7780936A0008959195B2 +:1004A0008195910941E0A5CF0895CF93DF93C09145 +:1004B000200AD091210A80910320909104209E016E +:1004C000281B390B209383213093842180919A201B +:1004D00081114BC080918321909184218E3C9F4F4C +:1004E000D4F480918321909184218B369F4F9CF08E +:1004F00080910220882321F080910220815008C041 +:1005000080916A008093822181E080939A208CE020 +:10051000809302202AC08CE0809302208091832166 +:10052000909184218A369F4F1CF08FEF9FEF02C07D +:1005300081E090E080937D2190937E2180918321C2 +:100540009091842120917D2130917E2160E370E0A3 +:100550000E948915261B370B20937D2130937E2125 +:1005600080917D2190917E213EDF80919A20813083 +:1005700029F58091832190918421C39794F08091F3 +:100580000220882331F08091022081508093022044 +:1005900015C080916A0080937F2183E080939A2028 +:1005A0000DC08091832190918421873991051CF49D +:1005B00081E090E002C08FEF9FEF15DFC093032032 +:1005C000D0930420DF91CF9108958617970779F093 +:1005D0006817790728F49C01261B370BB90109C05D +:1005E0008617970718F4681B790B03C0089560E01D +:1005F00070E0CB010895CF93DF938091002090911C +:100600000120892B51F080910020909101200197C9 +:10061000809300209093012043C080E490E0809379 +:10062000002090930120809107209091082001964E +:10063000B9F1809114019091150120910920263083 +:1006400018F467E771E002C06EEE72E00E94751563 +:10065000EC0180910720909108208C179D0758F499 +:100660006091072070910820CE01AFDF029718F04B +:1006700080EC9DE511C08091072090910820C8175B +:10068000D90770F46091072070910820CE019DDF9A +:10069000029730F08FEB9DE58093360A9093370AEE +:1006A000DF91CF910895AC01460F571F861B970B22 +:1006B0002091200A3091210A24173507C8F720918C +:1006C000200A3091210A8217930790F70895E0E8F5 +:1006D000F6E08FE0808385E0848308951F93CF93B5 +:1006E000DF93C0E4D0E0198180E4898340E250E0E8 +:1006F00068EB7BE280E290E00E944F0F1983DF916C +:10070000CF911F9108951F93CF93DF93C0E4D0E062 +:10071000198180E489838BEB95E20E94850F81E04B +:100720000E94970F1983DF91CF911F91089508952B +:100730000F931F932091A4208EEE92E0289FA0019A +:10074000299F500D112444525A4D08E913E02EEE12 +:1007500032E060E081E80E9432131F910F9108950A +:100760001CBEEEEFF0E40994B9DF8091B82B88232A +:1007700069F080E2E8EBFBE2ABEBB5E201900D92B1 +:100780008A95E1F71092BB25BEDFEADF87E0809310 +:10079000A200789473DDCBDFACD749D16CD160E097 +:1007A00080E003D1EFD08CE0E3D070D514D62DD605 +:1007B0008EDF60E870E28EE891E20E94AB150000E7 +:1007C0000000000000000000000000000000000029 +:1007D0000000000000000000000080919F2088239E +:1007E00071F3E091BA238E2F90E088309105A0F448 +:1007F000FC01E250FF4F0C949C1568D10DC0D8D17C +:100800000BC064D209C0E8D207C073D305C0F8D3C7 +:1008100003C0F7D301C067D410929F20D0CF0895B2 +:100820000895E09109208E2F90E08830910590F492 +:10083000FC01EA5FFE4F0C949C15B9D10BC045D268 +:1008400009C0C9D207C054D305C0D9D303C04AD404 +:1008500001C0BBD480911401809397218091150130 +:100860008093982180912401809399218091250182 +:1008700080939A218091200A8093A3218091210A5C +:100880008093A421809114019091150186349140A8 +:1008900080F08091140190911501893A914048F4BB +:1008A00080911401909115018093D82B9093D92BAE +:1008B00000008091A220882339F016DD1092A2203A +:1008C00081E08093A12008958091A120882341F0A8 +:1008D00080919A20833019F419DD8DDE01C0E5DDA9 +:1008E0008091A020882351F08091140190911501EE +:1008F0008093D82B9093D92B1092A0209091A42074 +:1009000081E0911180E08093A42008950F931F93BC +:1009100081E08093A7208093A22008E913E02DE7CF +:1009200030E04CED55E260E081E80E94321381E056 +:100930001F910F9108951092A720089581E00895C6 +:1009400081E0089510922002982F9C7193689093F3 +:10095000200287FF03C080E192E002C080E090E0C7 +:10096000892B809321021092220210922602089570 +:10097000E0E0F2E010AA836880AB80E181AB12AACC +:1009800016AA0895E0E0F2E010A683E880A78FE2BF +:1009900081A712A616A60895AAECB1E092E09C9356 +:1009A000E82FF0E084911C920895909171009D7F52 +:1009B0009093710010920002623011F09CE101C02E +:1009C0009EE19093010290E490930202811102C093 +:1009D00080E401C080EC80930302613011F084E078 +:1009E00001C083E08093040280E2D6DF80930C0292 +:1009F00081E2D2DF80930D02109218021092190248 +:100A000081E080930002BECF1F920F920FB60F922B +:100A100011248F93000000000000000081E080930B +:100A200023028F910F900FBE0F901F901895CF93B8 +:100A3000DF93E0E7F0E082818B7F8283C0E2D3E046 +:100A40008DE0888380E4898389E08A8383E3A4DF5F +:100A5000888782E3A1DF898787E39EDF8A8786E331 +:100A60009BDF8B87E0E2F6E08081836080831482E5 +:100A7000DF91CF910895E0E7F0E080818E7F808361 +:100A800080E8809300010895E0E0F1E0108A80E4BE +:100A9000808B10A280A310AA80ABE0E4F1E010826A +:100AA00080831092A6201092A5201092A42010926C +:100AB0008C2110928D2110928A2110928B21089501 +:100AC0008093BA2381E080939F200895CF93DF9392 +:100AD00010920920D9DFC0E0D1E01EAA94E298ABC1 +:100AE00019AA49E54AAB32E03BAB60910B2070910B +:100AF0000C206CAB7DAB6BEB73E268AF79AF1AAED9 +:100B00008BE38CAF83E08DAF1EAE28A9206828ABA5 +:100B100010924601E0E4F1E090831092410140938D +:100B200042018093430140910D2050910E2040934B +:100B30004401509345014AEA51E2409348015093E1 +:100B4000490110924A0129E320934C0180934D0101 +:100B500010924E01208120682083188A20E4288B7F +:100B600024E0288B898B85E98A8B80E18B8B47E792 +:100B700051E04C8B5D8B988F398F1A8E8CED95E2FE +:100B80008C8F9D8F1E8E68EC70E084EF91E08BDD82 +:100B900088EC90E0809307209093082081E0809378 +:100BA000062088898068888BDF91CF910895089509 +:100BB000EF92FF921F93CF93DF9311E010930920E0 +:100BC00063DFC0E0D1E018AA80E488AB94E098AB82 +:100BD00019AA1AAA6BE46BAB1CAA1DAA1EAA2AE0CA +:100BE00030E228AF39AF1AAEA0EAACAF58E05DAF43 +:100BF0001EAE88A9806A88ABE0EAF8E085E58083CC +:100C0000808310924601E0E4F1E044E240831092D8 +:100C1000410189E58093420132E030934301E09045 +:100C20000B20F0900C20E0924401F09245018BEBF8 +:100C3000E82E83E2F82EE0924801F09249011092EA +:100C40004A018BE380934C0183E080934D01109225 +:100C50004E0120812068208398A389A325E92AA337 +:100C60006BA367E771E06CA37DA3A8A759A71AA699 +:100C7000EAECF8E2ECA7FDA71EA6988B898B2A8BDD +:100C800080E18B8B6C8B7D8B488F398F1A8E8CED2E +:100C900095E28C8F9D8F1E8E68EC70E084EF91E062 +:100CA00002DD88EC90E08093072090930820109359 +:100CB000062088A1806888A388898068888BDF9156 +:100CC000CF911F91FF90EF90089508951F93CF93B8 +:100CD000DF9312E010930920D7DEC0E0D1E01EAA16 +:100CE00094E298AB19AA39E53AAB1BAB40910B20C3 +:100CF00050910C204CAB5DAB4BEB53E248AF59AF7E +:100D00001AAE8BE38CAF83E08DAF1EAE28A92068AE +:100D100028AB10924601E0E4F1E09083109241018B +:100D2000309342018093430120910D2030910E2099 +:100D300020934401309345012AEA31E2209348018F +:100D40003093490110924A0129E320934C0180938A +:100D50004D0110924E01208120682083188A20E4E2 +:100D6000288B64E0688B898B55E95A8B40E14B8B6B +:100D700027E731E02C8B3D8B988F198F1A8EECED85 +:100D8000F5E2EC8FFD8F1E8E68A389A35AA34BA3B7 +:100D90002CA33DA384E388A719A71AA68AEC98E29E +:100DA0008CA79DA71EA668EC70E084EF91E07BDC29 +:100DB00088EC90E0809307209093082081E0809356 +:100DC000062088898068888B88A1806888A3DF9145 +:100DD000CF911F91089508951F93CF93DF9313E050 +:100DE0001093092051DEC0E0D1E010924601E0E40A +:100DF000F1E024E220831092410199E590934201B1 +:100E000082E08093430140910B2050910C2040934D +:100E10004401509345014BEB53E2409348015093FA +:100E2000490110924A018BE380934C0110934D01CC +:100E300010924E018081806880831EAA28AB19AA77 +:100E40009AAB1BAB80910D2090910E208CAB9DAB8B +:100E50008AEA91E288AF99AF1AAE89E38CAF1DAFF1 +:100E60001EAE88A9806888AB18A250E458A344E05D +:100E700048A319A21AA23BE43BA31CA21DA21EA2D6 +:100E80008AE090E288A799A71AA620EA2CA798E002 +:100E90009DA71EA688A1806A88A385E58093A008E7 +:100EA000188A588B488B198B85E98A8B3B8B47E7CF +:100EB00051E04C8B5D8B288F998F1A8E8CED95E2CB +:100EC0008C8F9D8F1E8E68EC70E084EF91E0EBDBE1 +:100ED00088EC90E0809307209093082081E0809335 +:100EE000062088898068888BDF91CF911F910895B3 +:100EF00008951F93CF93DF9314E010930920C4DD6E +:100F0000C0E0D1E018AA80E488AB18AB19AA1AAAED +:100F10003BE43BAB1CAA1DAA1EAA8AE090E288AF64 +:100F200099AF1AAE50EA5CAF88E08DAF1EAE98A9BB +:100F3000906A98AB95E59093A00810924601E0E482 +:100F4000F1E094E290831092410199E5909342017F +:100F500092E09093430160910B2070910C2060937C +:100F60004401709345016BEB73E260934801709309 +:100F7000490110924A019BE390934C0193E09093B6 +:100F80004D0110924E01208120682083188B998B8F +:100F900045E94A8B3B8B27E731E02C8B3D8B588F03 +:100FA000898F1A8E6CED75E26C8F7D8F1E8E18A363 +:100FB00099A34AA39AE49BA32CA33DA393EC98A7DF +:100FC00089A71AA68AEC98E28CA79DA71EA668ECB2 +:100FD00070E084EF91E067DB88EC90E0809307207D +:100FE0009093082081E08093062088898068888B10 +:100FF00088A1806888A3DF91CF911F9108950895FB +:10100000FFCFCF93DF9386E0809309203DDDC0E0E2 +:10101000D1E01EAA84E288AB19AA39E53AAB93E085 +:101020009BAB40910D2050910E204CAB5DAB4AEA3A +:1010300051E248AF59AF1AAE29E32CAF9DAF1EAEB7 +:1010400028A9206828AB10924601E0E4F1E08083F3 +:10105000109241013093420122E0209343014091DC +:101060000B2050910C2040934401509345014BEBD1 +:1010700053E2409348015093490110924A013BE3E7 +:1010800030934C0190934D0110924E0190819068E5 +:101090009083188A90E4988B888B198A95E99A8BAB +:1010A00090E19B8B4CED55E04C8B5D8B888F298FAD +:1010B0001A8E8CED95E28C8F9D8F1E8E68EC70E001 +:1010C00084EF91E0F0DA80E991E08093072090933B +:1010D000082081E08093062088898068888BDF91D2 +:1010E000CF9108950895CF93DF9387E080930920EF +:1010F000CBDCC0E0D1E01EAA84E288AB19AA39E5B6 +:101100003AAB93E09BAB40910D2050910E204CAB3D +:101110005DAB4AEA51E248AF59AF1AAE29E32CAFB2 +:101120009DAF1EAE28A9206828AB10924601E0E4CE +:10113000F1E08083109241013093420122E020933C +:10114000430140910B2050910C2040934401509357 +:1011500045014BEB53E240934801509349011092F3 +:101160004A013BE330934C0190934D0110924E01A4 +:10117000908190689083188A90E4988B95E2988B80 +:10118000198A95E99A8B90E19B8B4CED55E04C8B3D +:101190005D8B888F298F1A8E8CED95E28C8F9D8FB9 +:1011A0001E8E68EC70E084EF91E07DDA80E991E0DA +:1011B000809307209093082081E0809306208889FF +:1011C0008068888BDF91CF91089508951F920F92C8 +:1011D0000FB60F9211248F939F9381E080930301A8 +:1011E0001092100184E08093100187E791E08093D2 +:1011F0001401909315018091A420811103C08EEEFB +:1012000092E002C080E090E084529A4D80931C01ED +:1012100090931D01809110018068809310019F912F +:101220008F910F900FBE0F901F9018951F920F92E5 +:101230000FB60F9211248F939F9382E08093030146 +:101240001092200184E08093200187E791E0809351 +:101250002401909325018091A420811103C085E68B +:1012600094E002C087E791E084529A4D80932C016C +:1012700090932D01809120018068809320019F919F +:101280008F910F900FBE0F901F901895E0E7F0E040 +:1012900083818C7F838384818C7F848380818D7F15 +:1012A0008083E0E8F1E080EC8283128688EC818321 +:1012B0001186A0E0B8E034E03C9323E011962C9333 +:1012C000119714961C92149785ED91E096968D9344 +:1012D0009C93979716961C921697E0E4F8E030835B +:1012E0002183148286A397A31682E0E6F6E080812C +:1012F00080618083E0E4F9E083E18183148282E00D +:101300008683A6A3B7A310A611A681E080830895C3 +:101310001F920F920FB60F9211242F933F934F936A +:101320005F938F939F93CF93DF931F92CDB7DEB7D9 +:101330008FEF80934C0980910920873031F48091A0 +:101340002C02898390912D0202C090912C028091F1 +:10135000A320891B209168093091690982308CF0A3 +:101360002A3F374070F4209168093091690989302B +:101370001CF481E090E002C086E090E0820F931FB1 +:1013800018C020916809309169098F3FB4F4273063 +:10139000310598F02091680930916909883F1CF067 +:1013A00081E090E002C086E090E0A901481B590B63 +:1013B000CA0180937809909379090F90DF91CF91BA +:1013C0009F918F915F914F913F912F910F900FBE01 +:1013D0000F901F901895E0E7F0E083818F7E838364 +:1013E000E0E4F6E080818A6A80838FEF848388E579 +:1013F000828BE0EAF8E080E3838384EC858387E0F6 +:101400008683178288E184830895E0E7F0E0838192 +:10141000877F8383E0ECF8E0118288E580935506AE +:1014200080E6808308951F920F920FB60F921124C9 +:1014300000000F900FBE0F901F9018951F920F92F3 +:101440000FB60F9211248F93EF93FF93E0EAF8E029 +:1014500080818083FF91EF918F910F900FBE0F904D +:101460001F9018959FB7F894A0E5B0E016968C9160 +:101470001697897F16968C931697E0E6F0E080E841 +:1014800085838BEB868316968C91169784601696CF +:101490008C938081816080839FBF08959FB7F8946B +:1014A000E82FF0E0E059FF4F60958081682360836A +:1014B0009FBF0895CF93863011F0C0E001C0C8E10E +:1014C0008091510081FD0DC09FB7F894809150002C +:1014D0008260809350009FBF8091510081FFFCCFBC +:1014E000C1DF6C2F636084E490E0BED460E480E0F0 +:1014F000CF91D4CF8091A82008958091A8208130E9 +:1015000009F419CA0895F0D0FC0183818093A820C2 +:10151000811101C0FBC981E008959091AA23892F10 +:10152000807697FF07C0803491F48091AB238111BE +:101530000EC006CA803459F48091AB23811107C0D4 +:101540008091B0239091B123892B09F0F7C980E0F5 +:1015500008958091AC238F770C94BC129091B020A9 +:10156000911102C080E00895E091AD20F091AE208D +:101570000190F081E02D94818917A0F7E093AB20D2 +:10158000F093AC20228133812E0F3F1FE217F30727 +:1015900098F49181943061F49281891309C0938108 +:1015A000691306C0E093AB20F093AC2081E008956E +:1015B0009081E90FF11DEACFE093AB20F093AC20CE +:1015C000D1CFE091AD20F091AE200190F081E02DDF +:1015D000228133812E0F3F1FFC014081E40FF11D5A +:1015E000E217F30748F48181843031F0853039F017 +:1015F0008081E80FF11DF4CF80E090E00895CF01E5 +:1016000008951F93CF93DF93182FA8DF882339F114 +:10161000C091AB20D091AC20CE01D3DFEC01892B5F +:1016200041F04C815D816B818A81B3D78111F4CF08 +:1016300016C0E091AD20F091AE2092818381E92F18 +:10164000F82FE10FF11DE10FF11D0190F081E02D68 +:101650000190F081E02DDF91CF911F91099480E0FE +:10166000DF91CF911F910895EF92FF921F93CF9337 +:10167000DF93C82F60E072DF811102C010E02DC03F +:10168000E091AD20F091AE2092818381E92FF82F77 +:10169000EC0FF11DEC0FF11DE080F180D7011696E3 +:1016A000ED91FC9117970995682F8C2F57DF182F14 +:1016B000882321F3C091AB20D091AC20CE0181DFF3 +:1016C000EC01892B21F08A810E94DC13F7CFD7012E +:1016D0001296ED91FC9113970995812FDF91CF918F +:1016E0001F91FF90EF9008958091AB209091AC20D6 +:1016F0000895E4C6CF938091B020882311F0C0E014 +:1017000008C01092B0201092B4201092B520CF9152 +:101710000895E091AD20F091AE200190F081E02D90 +:101720008481C81770F78C2F9FDFCF5FF2CFCF93E4 +:101730008091B0208823F1F0C0E0E091AD20F091DD +:10174000AE20A081B18114968C91C81798F4928133 +:101750008381E92FF82FEC0FF11DEC0FF11D0190A3 +:10176000F081E02D0084F185E02D309709F0099596 +:10177000CF5FE3CFCF9108950F931F93CF93DF9364 +:101780001092B4231092B5231092B6231092B7236F +:101790001092B8231092B9238091AA2387FF07C023 +:1017A0002091B0233091B123232B09F457C38076C5 +:1017B000803409F011C1E091AB238E2F90E0FC0141 +:1017C000E05AF109EB30F10508F006C1E25FFE4F87 +:1017D0000C949C1581E08093A0208091072090912B +:1017E000082080939B21809107209091082090935E +:1017F0009C218091822180939D2180917F218093E3 +:101800009E2180916A0080939F2180916B0080933C +:10181000A0216091B0237091B1238EE891E2D6C0EF +:10182000109200088091AC239091AD2380933608EC +:10183000909337088091AE238F7080930008609159 +:10184000B0237091B1238AEA91E29CD68091B023B3 +:101850009091B12320910D2030910E208217930793 +:1018600009F4C7C280930D2090930E2026C01092D9 +:1018700040088091AC239091AD238093760890939B +:1018800077088091AE238F70809340086091B023D9 +:101890007091B1238BEB93E275D68091B023909138 +:1018A000B12320910B2030910C208217930709F46B +:1018B000A0C280930B2090930C208091092053C0EC +:1018C00010926809109269098091AC238093A3203B +:1018D00090C28091AC23809324068BC2E091AC230C +:1018E000F091AD23E830F10508F076C0E75EFE4FD9 +:1018F0000C949C1560E080E058D88091AE2322D8EB +:1019000080E031C060E080E050D88091AE231AD8EA +:1019100081E029C061E081E048D88091AE2312D8EF +:101920008091AF2325D882E01EC083E01CC084E0F4 +:101930001AC060E080E039D88091AE2303D885E0FA +:1019400012C061E080E031D88091AE230E94A204F1 +:1019500086E009C062E080E028D88091AE238068EC +:101960000E94A20487E0ACD844C28091AC2380934B +:1019700084063FC28091AC239091AD23892B91F0D6 +:101980000E946E0380E2E8EBFBE2ABEBB5E2019074 +:101990000D928A95E1F781E08093BB250E94830335 +:1019A0000E946E03E9E7F0E091E088EDF89484BFCF +:1019B00090836091B0237091B1238AE890E206C0D1 +:1019C0006091B0237091B12389E890E2DBD511C218 +:1019D0000E94860481110DC28091AA23982F9076CF +:1019E00009F0C9C187FFFBC02091B0233091B1231A +:1019F0002115310509F4BFC18F7109F09EC0809196 +:101A0000AB23863071F0883009F48EC08111B3C1E8 +:101A10002230310509F0AFC162E070E084EB90E262 +:101A2000D5CF8091AC239091AD23292F332722303D +:101A30003105A1F060F42130310509F09CC180919D +:101A4000192090911A20DC016C9170E05BC023306A +:101A5000310589F12F30310509F18DC1E09119204F +:101A6000F0911A202189821708F085C19927880FE3 +:101A7000991F880F991FE0911B20F0911C20E80FFF +:101A8000F91F80819181FC01628173817BD5E09196 +:101A9000B223F091B32382E0818335C080911D2071 +:101AA00090911E20009709F466C1DC0112966D9199 +:101AB0007C91139727C099278130910569F038F000 +:101AC000029709F058C168E08AE690E208C064E035 +:101AD00070E08CE790E216C067E083E790E2282F81 +:101AE000AAE5B0E2FC01819190E08D939D938E2F49 +:101AF000821B8617C0F3660F6E5F6093582070E0FC +:101B000088E590E23FD58091B0239091B123209158 +:101B1000B4233091B5238217930708F06AC18093EC +:101B2000B4239093B52365C12130310509F023C159 +:101B300061E070E080EB90E249CF8130C1F58091A7 +:101B4000AB238A3009F017C12130310509F013C1E8 +:101B50008091B020882309F40EC1C091AE23D091AA +:101B6000AF230091AD201091AE20D801ED91FC91F2 +:101B70008481C81708F0FFC060E08C2FEFDC882359 +:101B800009F4F9C0DD27CC0FDD1FF80182819381B4 +:101B9000C80FD91FE881F9810680F781E02D0995EA +:101BA0008093B22061E070E082EB90E20FCF823050 +:101BB00009F0E1C08091AB238111DDC022303105F5 +:101BC00009F0D9C08091AE232DD590E08093A92053 +:101BD0009093AA2062E070E089EA90E2F7CE8F71DC +:101BE00009F07DC08091AB23833009F4C4C018F4A0 +:101BF0008130A1F0C0C0853019F0893039F1BBC007 +:101C00008091B0239091B123892B09F0B4C089EA67 +:101C10009AE08093B6239093B723EBC08091B023D2 +:101C20009091B123892B09F0A6C08091AC239091AB +:101C3000AD23019709F09FC08091B4209091B52009 +:101C40008D7F8093B4209093B520D3C08091B02332 +:101C50009091B123892B09F08EC091D4882309F487 +:101C60008AC02091AC233091AD233327E091192015 +:101C7000F0911A20818990E08217930708F47BC0C5 +:101C800039DD8091AC239091AD238093B0208823DF +:101C900009F4AFC099278150904C880F991F880F85 +:101CA000991F20911B2030911C20820F931F80933D +:101CB000AD209093AE20C0E0E091AD20F091AE2039 +:101CC0000190F081E02D8481C81708F092C060E097 +:101CD0008C2F97DC882309F44EC0CF5FEDCF813085 +:101CE000E9F48091AB238B3009F045C08091B0239B +:101CF0009091B123892B09F03EC08091B0208823B8 +:101D000009F439C0C091AE23D091AC238C2FACDC48 +:101D1000882389F16D2F8C2F74DC2BC0823059F50C +:101D20008091AB23813019F0833089F024C08091F9 +:101D3000B0239091B123892BF1F48091AC23909141 +:101D4000AD23892BC1F48091AE2373D412C080914E +:101D5000B0239091B123892B71F48091AC239091A1 +:101D6000AD23892B41F48091AE23F6D48091AE232C +:101D70002CD581113EC08091AA238F718130D9F575 +:101D80008091B020882309F469C0C091AE23D0911E +:101D9000AF230091AD201091AE20D801ED91FC91C0 +:101DA0008481C81708F05AC060E08C2FD7DB8823E5 +:101DB00011F1FE01FF27EE0FFF1FD80112968D9142 +:101DC0009C911397E80FF91F00811181D801169695 +:101DD000ED91FC9117970995682F8C2FBFDB882315 +:101DE00051F0D8011496ED91FC911597099588232F +:101DF00011F081E034C08091AA238F71823071F597 +:101E00008091B020882351F1C0E0E091AD20F091A5 +:101E1000AE20A081B18114968C91C817F8F49281FC +:101E20008381E92FF82FEC0FF11DEC0FF11D0081DC +:101E30001181D8011696ED91FC9117970995682F9D +:101E40008C2F8CDB882351F0D8011496ED91FC91F6 +:101E5000159709958111CDCFCF5FD7CF80E0DF9166 +:101E6000CF911F910F9108951BBEFC0128ED24BF57 +:101E7000608308958091CF0187FDFCCF08951F9363 +:101E8000CF93DF93C0ECD1E01A858A8761E08BECB9 +:101E900091E0EADF1A87DF91CF911F910895CF92E9 +:101EA000DF92EF92FF920F931F93CF93DF938C01FA +:101EB0007B016A01DFDFCCECD1E088818860888318 +:101EC000B801705FA601C7013DD68881877F8883EE +:101ED000DF91CF911F910F91FF90EF90DF90CF9006 +:101EE0000895CF93DF93C82FD62FC4DFACECB1E0B9 +:101EF0008C9188608C93EC2FF0E0F05FD0838C9114 +:101F0000877F8C93DF91CF9108950F931F93CF9389 +:101F10008C01B0DFC0E0F80161918F018C2FE1DF0F +:101F2000CF5FC032C1F7CF911F910F910895CF932A +:101F3000C82FA0DF20E2C29FC0011124E0ECF1E035 +:101F400012829183808385E3CF9199CF4091CA011A +:101F5000E62FF72F8093CA0184914093CA01089518 +:101F6000E82FF0E0E652F44D80818F3F09F4FFCF77 +:101F70009FB7F89480818F5F80839FBF0895E82F7B +:101F8000F0E0E652F44D8081811101C0FFCF9FB790 +:101F9000F8948081815080839FBF0895CF93C82F8C +:101FA00080917C21C11105C0882339F081E0E7DFF1 +:101FB00004C0811102C081E0D3DFC0937C21CF91A6 +:101FC0000895282F2F70082E000C990B392F331FDE +:101FD0003327331F832F90E0820F911D820F911DB5 +:101FE00023E0880F991F2A95E1F7885A9E4D08959E +:101FF0000F93E8ECF4E080818F7D808380818F7D7A +:102000008083E0E6F1E202E00593109262211092F3 +:10201000632100E2069300E40693E8E5F1E200E2C2 +:10202000069300E40693EAEAF3E214861586168620 +:1020300017861286138610924D210F9108950F93E3 +:1020400085E080934D21E1E6F1E204E00593E9E5C6 +:10205000F1E204E005930F9108950F9383E08093DC +:102060004D211092622110926321E0E6F1E202E03C +:1020700006930F910895E091B623F091B72330971E +:1020800009F009940895282F2F70082E000C990B41 +:10209000392F331F3327331F832F90E0820F911D79 +:1020A000820F911D029749E0489F9001499F300D92 +:1020B0001124C90189509F4D0895AF92BF92DF92BC +:1020C000EF92FF920F931F93CF93DF93D82EDBDF16 +:1020D000EC018D2D76DF7C01DC011196EC91E7702F +:1020E000E150E73040F4F0E0EE0FFF1FE457FF4D02 +:1020F0000081118102C008E010E02D813E818B81BA +:102100009C814881D7FE4AC0F70166817781260FFE +:10211000371F2D833E8328173907A1F1BC01621BAD +:10212000730B9B01211574E0370738F02FEF33E074 +:10213000C901B801DAD4281B390B41FF0AC0C90113 +:10214000B801D3D4AC0191E0452B09F090E0892F80 +:1021500001C080E0988180FB91F99883D7011696A1 +:102160001D921C92179712962D933C9313972981D9 +:102170003A818D819E81820F931F14968D939C933B +:10218000159708C041FF78C04D7F4883168217829B +:1021900012821382F70102E0069385C0D7011296DE +:1021A000AD90BC90139742FF0FC0E981FA81B8014E +:1021B0009CD4B0E4DB9EB001112469587F4DAC0182 +:1021C000CF01820F931FBED42D813E812A0D3B1D6E +:1021D0002D833E838B819C818217930710F48D831E +:1021E0009E83F70126813781A216B30609F044C009 +:1021F0002D813E818217930709F43EC0AC01421B3A +:10220000530B9A01211554E0350750F02FEF33E0BE +:10221000C901B8016AD4B901681B790BCB0107C0A9 +:10222000C901B80162D4D901A81BB90BCD01F701CE +:10223000128213828017910798F4888184608883C2 +:10224000F0E4DF9EC001112489589F4DD7011496F8 +:102250008D939C93159716960D931C9317979ACF71 +:1022600049815A812D813E81240F351FF701248336 +:102270003583868397838ECF888180FF14C08E7FBD +:102280008883EF81F885309771F06D817E814D2DC7 +:1022900080E0DF91CF911F910F91FF90EF90DF9041 +:1022A000BF90AF900994DF91CF911F910F91FF9054 +:1022B000EF90DF90BF90AF9008950F93CF93DF938F +:1022C00080914D21833029F4D6DEDF91CF910F919B +:1022D0008FCE2091492130914A21C091B423D091D1 +:1022E000B523C21BD30B61F580914B2190914C21FA +:1022F000820F931F80934B2190934C212091B02308 +:102300003091B1238217930721F08091B620882362 +:1023100031F084E080934D21E8E5F1E236C0E091B0 +:10232000B823F091B923309799F00995882381F06B +:102330001092492110924A21C091B423D091B52323 +:10234000C034D10528F01092B620C0E4D0E003C01C +:1023500081E08093B620C0936221D0936321809165 +:10236000492190914A212091B2233091B323280F23 +:10237000391F2093642130936521C80FD91FC09362 +:102380004921D0934A21E0E6F1E202E00693DF9191 +:10239000CF910F9108950F93CF938091CC0480FF3C +:1023A00063C021E02093CC0488E591E2FC0100E8C1 +:1023B0000693E0E6F1E200E806932093CA04FC01EC +:1023C00000E1069380914D21882329F083508230CB +:1023D00008F451DE0DDE80915A2190915B2108971F +:1023E00009F044C088E0E9E0F1E2AAEAB3E2019032 +:1023F0000D928A95E1F78091C80480628093C804A9 +:102400008091C80480628093C804B6D9C82F811116 +:1024100002C015DE2BC08091AA2387FF0DC0109249 +:102420004B2110924C211092492110924A2182E0B6 +:1024300080934D2142DF1BC08091B0239091B12346 +:10244000892B11F40ADE13C010924B2110924C21FB +:102450001092492110924A2181E080934D21E8E5B4 +:10246000F1E202E0069303C0C0E001C0C1E08C2F9E +:10247000CF910F910895CF93CFB7F89481E08EDD7F +:10248000EAECF4E080E4808380E28083E1ECF4E035 +:10249000808181608083A9ECB4E08C9182608C9310 +:1024A000E8ECF4E08081806480838C9181608C937F +:1024B000808180688083CFBFCF910895CF931092A1 +:1024C000600080E30E945A0A8091C0048064809377 +:1024D000C00481E080936000CFB7F8941092592136 +:1024E0001092612110926921109271218091F72040 +:1024F0008E7F8093F720809100218E7F8093002132 +:102500006AE170E082E022DD8F3F09F48FE1809381 +:10251000FA046BE170E082E019DD8F3F09F48FE18E +:102520008093FB048091C00481608093C0048091FB +:10253000C00480688093C0048091C004806180934F +:10254000C00488E591E28093C6049093C70480910B +:10255000C00480628093C0048FEF8093C504809193 +:10256000C80482608093C80410927C2185E0F8DC66 +:1025700082DFCFBFCF9108958093C30408958091E7 +:10258000C3040895EAEAF3E280879187628773873C +:1025900008951F93CF93DF93162FEA0112DDFC01FC +:1025A0008181807CD1F5612F6370613019F020F05A +:1025B00080E803C080EC01C080E4C038D105E1F0C0 +:1025C00050F4C032D105A1F0C034D10599F0609724 +:1025D000C9F491E018C0C11592E0D90779F0CF3F56 +:1025E00093E0D90769F0C115D14061F495E00BC0C3 +:1025F00092E009C093E007C094E005C096E003C0F4 +:1026000097E001C090E0118226E02083982B91830F +:1026100081818062818381E001C080E0DF91CF9180 +:102620001F910895CEDCFC01818182FB882780F90F +:102630000895CF93C82FC5DCFC01818182FF0FC0B4 +:1026400081818B7F81838C2F1EDDFC01908190FF27 +:1026500006C09E7F90830780F085E02D099581E07C +:10266000CF910895AF92BF92CF92DF92EF92FF92F7 +:102670000F931F93CF93DF93D82EC62E5A01790163 +:1026800002DDEC018D2D9DDC9C01DC0111968C910D +:102690001197807C09F454C011968C911197807C1D +:1026A000803C21F011968C9182FD4AC09FB7F8942E +:1026B000888180FF02C09FBF43C0816088839FBF25 +:1026C000A982BA82EB82FC821D821E820F83188748 +:1026D00091E0C11004C0E114F10409F090E0888198 +:1026E00090FB81F98B7F8883D7FE02C0F90122C05D +:1026F000D90111968C911197807C803CC1F4119680 +:10270000EC91E770E150E73040F4F0E0EE0FFF1F8E +:10271000E457FF4D6081718102C068E070E0C7013D +:10272000E4D1892B21F088818E7F888309C0F9014B +:1027300012821382168217828D2DBFDC81E001C0C8 +:1027400080E0DF91CF911F910F91FF90EF90DF908C +:10275000CF90BF90AF900895EF92FF920F93CF93D9 +:10276000C82F2FDC7C018C2F8EDCDC01F70102E00E +:1027700005939C9190FF1BC09E7F9C931796ED91B3 +:10278000FC911897309799F0D701C7FF05C01696AE +:102790006D917C91179704C012966D917C9113975F +:1027A0004C2F81E0CF910F91FF90EF900994CF9142 +:1027B0000F91FF90EF900895CF93C82FCDDF8C2F0E +:1027C00000DCFC011182CF9108950F93CF93C82FA5 +:1027D000F8DBFC0181818460818301E006938C2F0A +:1027E000BBDF81E0CF910F9108951F920F920FB63A +:1027F0000F9211240F932F933F934F935F936F93F7 +:102800007F938F939F93AF93BF93EF93FF938091A9 +:10281000CB0487FF08C080E88093CA040E94970B0E +:102820000E9411047EC08091CB0482FF18C084E016 +:102830008093CA048091602186FF73C08091CC048C +:1028400081FD6FC0A8DD81116CC080914D21813068 +:1028500011F403DC66C0843009F063C021C08091AC +:10286000CB0481FF26C082E08093CA048091582166 +:1028700086FF57C08091CC0481FD53C08CDD81114F +:1028800050C080914D21823041F484E080934D21ED +:10289000E8E5F1E202E0069344C0833009F041C06C +:1028A000E1E6F1E204E00593E9E5F1E204E00593F5 +:1028B00038C08091CB0484FF1DC080E18093CA049E +:1028C0000E947A0B1092C3041092592196E09093C3 +:1028D000582183E4809359211092612190936021C3 +:1028E0008093612189E091E280935C2190935D2146 +:1028F0007FDB17C08091CB0486FF08C080E4809303 +:10290000CA0480E04BDB0E940F040BC08091CB0413 +:1029100085FF07C080E28093CA0481E03FDB0E940C +:102920001004FF91EF91BF91AF919F918F917F9193 +:102930006F915F914F913F912F910F910F900FBE2B +:102940000F901F9018951F920F920FB60F9211249F +:102950000F931F932F933F934F935F936F937F93A7 +:102960008F939F93AF93BF93CF93DF93EF93FF9397 +:102970008091CC0481FF1AC082E08093CC048091C6 +:10298000C5048195880FE8E5F1E2E81BF109208193 +:1029900031812855314283E0369527958A95E1F7B4 +:1029A000822F869520FD06C0C0E005C0F4DC882398 +:1029B00019F386C0C0E8C80F8C2F03DBFC0120810F +:1029C00025FF7EC000E20693C11174C080914D21A5 +:1029D000843019F450DB0CDB73C000915A21109144 +:1029E0005B218091B4239091B523C0914921D0916E +:1029F0004A2198012C0F3D1F8217930718F48C0170 +:102A00000C1B1D0B8091B2239091B323A80169E0A8 +:102A100071E28C0F9D1F96D0C00FD11FC09349212A +:102A2000D0934A210034110569F480914B21909193 +:102A30004C218C0F9D1F2091B0233091B123821720 +:102A4000930788F0C093B423D093B523E091B823C3 +:102A5000F091B923309729F00995811102C0EFDA7E +:102A60002FC0FBDA2DC08091B4239091B523C817F5 +:102A7000D907D9F4E091B823F091B923309779F3CD +:102A80000995882361F320914B2130914C2180914D +:102A9000492190914A21820F931F80934B2190935B +:102AA0004C211092492110924A21E8E5F1E202E01E +:102AB000069306C0C03811F400DC02C08C2FFDDA8A +:102AC000FF91EF91DF91CF91BF91AF919F918F9146 +:102AD0007F916F915F914F913F912F911F910F9136 +:102AE0000F900FBE0F901F901895AA1BBB1B51E1B2 +:102AF00007C0AA1FBB1FA617B70710F0A61BB70B6E +:102B0000881F991F5A95A9F780959095BC01CD0112 +:102B1000089597FB072E16F4009406D077FD08D091 +:102B2000E4DF07FC05D03EF4909581959F4F089512 +:102B3000709561957F4F0895EE0FFF1F0590F491FA +:102B4000E02D0994FB01DC0102C001900D9241507F +:102B50005040D8F70895FB01DC0101900D92002050 +:082B6000E1F70895F894FFCF9E +:102B680040000CE02E0AFFFFFFFF55800080008325 +:102B78000A7D0A8D0A7A0A000044201F20000028D6 +:102B88002023200F20000000090219000101008005 +:102B9800FA0904000001FFFFFF0007058101FF0398 +:102BA800010000001201000200000040EB0394BA8B +:102BB8000002010200010000000300000000000004 +:102BC800000000000000000000004C6162726164B7 +:102BD8006F72004573706F54656B0000040309043D +:102BE8006465627567313233000205001000200009 +:0A2BF8004000800000010002FF030E +:00000001FF diff --git a/Desktop_Interface/genericusbdriver.cpp b/Desktop_Interface/genericusbdriver.cpp index 1e1ecf27..31624f4a 100644 --- a/Desktop_Interface/genericusbdriver.cpp +++ b/Desktop_Interface/genericusbdriver.cpp @@ -340,6 +340,11 @@ void genericUsbDriver::avrDebug(void){ */ } +void genericUsbDriver::kickstartIso(void){ + qDebug() << "Attempting to kickstart iso..."; + usbSendControl(0x40, 0xaa, 0, 0, 0, NULL); +} + void genericUsbDriver::requestFirmwareVersion(void){ usbSendControl(0xc0, 0xa8, 0, 0, 2, NULL); firmver = *((unsigned short *) inBuffer); diff --git a/Desktop_Interface/genericusbdriver.h b/Desktop_Interface/genericusbdriver.h index da59a629..bcf3ee17 100644 --- a/Desktop_Interface/genericusbdriver.h +++ b/Desktop_Interface/genericusbdriver.h @@ -15,7 +15,7 @@ //#include "buffercontrol.h" #include "unified_debug_structure.h" -#define EXPECTED_FIRMWARE_VERSION 0x0004 +#define EXPECTED_FIRMWARE_VERSION 0x0005 #ifdef WINDOWS_64_BIT #define DEFINED_EXPECTED_VARIANT 1 @@ -123,6 +123,7 @@ public slots: virtual void shutdownProcedure() = 0; void checkConnection(); void bootloaderJump(); + void kickstartIso(); }; diff --git a/Desktop_Interface/mainwindow.cpp b/Desktop_Interface/mainwindow.cpp index 04e5eb2a..cdd83326 100644 --- a/Desktop_Interface/mainwindow.cpp +++ b/Desktop_Interface/mainwindow.cpp @@ -46,6 +46,7 @@ MainWindow::MainWindow(QWidget *parent) : ui->debugButton1->setVisible(0); ui->debugButton2->setVisible(0); ui->debugButton3->setVisible(0); + ui->kickstartIsoButton->setVisible(0); ui->debugConsole->setVisible(0); #ifndef PLATFORM_ANDROID ui->console1->setVisible(0); @@ -1005,6 +1006,7 @@ void MainWindow::enableLabradorDebugging(){ ui->debugButton1->setVisible(1); ui->debugButton2->setVisible(1); ui->debugButton3->setVisible(1); + ui->kickstartIsoButton->setVisible(1); ui->debugConsole->setVisible(1); new Q_DebugStream(std::cout, ui->debugConsole); //Redirect Console output to QTextEdit @@ -2074,3 +2076,8 @@ void MainWindow::on_actionQuit_triggered() { QApplication::quit(); } + +void MainWindow::on_kickstartIsoButton_clicked() +{ + ui->controller_iso->driver->kickstartIso(); +} diff --git a/Desktop_Interface/mainwindow.h b/Desktop_Interface/mainwindow.h index e799b400..029907cf 100644 --- a/Desktop_Interface/mainwindow.h +++ b/Desktop_Interface/mainwindow.h @@ -182,6 +182,8 @@ private slots: void on_actionQuit_triggered(); + void on_kickstartIsoButton_clicked(); + private: //Generic Vars Ui::MainWindow *ui; diff --git a/Desktop_Interface/ui_files_desktop/mainwindow.ui b/Desktop_Interface/ui_files_desktop/mainwindow.ui index a9904d17..8713c637 100644 --- a/Desktop_Interface/ui_files_desktop/mainwindow.ui +++ b/Desktop_Interface/ui_files_desktop/mainwindow.ui @@ -1293,6 +1293,13 @@ + + + + kickstartIso() + + + diff --git a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.cpp b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.cpp index 11829b26..15d3a862 100644 --- a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.cpp +++ b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.cpp @@ -92,3 +92,8 @@ void MainWindow::on_pushButton_5_clicked() ui->widget->replot(); } + +void MainWindow::on_pushButton_6_clicked() +{ + qDebug() << librador_reset_usb(); +} diff --git a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.h b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.h index 892aa4a7..34374d84 100644 --- a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.h +++ b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.h @@ -27,6 +27,8 @@ private slots: void on_pushButton_5_clicked(); + void on_pushButton_6_clicked(); + private: Ui::MainWindow *ui; }; diff --git a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.ui b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.ui index 857a6123..93a61b98 100644 --- a/Matlab_Octave_API/___librador/demo/librademo/mainwindow.ui +++ b/Matlab_Octave_API/___librador/demo/librademo/mainwindow.ui @@ -38,6 +38,13 @@ + + + + Reset USB + + + diff --git a/Matlab_Octave_API/___librador/demo/librademo/moc_mainwindow.cpp b/Matlab_Octave_API/___librador/demo/librademo/moc_mainwindow.cpp index 53839d1f..94343b80 100644 --- a/Matlab_Octave_API/___librador/demo/librademo/moc_mainwindow.cpp +++ b/Matlab_Octave_API/___librador/demo/librademo/moc_mainwindow.cpp @@ -21,8 +21,8 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_MainWindow_t { - QByteArrayData data[7]; - char stringdata0[130]; + QByteArrayData data[8]; + char stringdata0[154]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ @@ -37,12 +37,14 @@ QT_MOC_LITERAL(2, 33, 0), // "" QT_MOC_LITERAL(3, 34, 23), // "on_pushButton_2_clicked" QT_MOC_LITERAL(4, 58, 23), // "on_pushButton_3_clicked" QT_MOC_LITERAL(5, 82, 23), // "on_pushButton_4_clicked" -QT_MOC_LITERAL(6, 106, 23) // "on_pushButton_5_clicked" +QT_MOC_LITERAL(6, 106, 23), // "on_pushButton_5_clicked" +QT_MOC_LITERAL(7, 130, 23) // "on_pushButton_6_clicked" }, "MainWindow\0on_pushButton_clicked\0\0" "on_pushButton_2_clicked\0on_pushButton_3_clicked\0" - "on_pushButton_4_clicked\0on_pushButton_5_clicked" + "on_pushButton_4_clicked\0on_pushButton_5_clicked\0" + "on_pushButton_6_clicked" }; #undef QT_MOC_LITERAL @@ -52,7 +54,7 @@ static const uint qt_meta_data_MainWindow[] = { 7, // revision 0, // classname 0, 0, // classinfo - 5, 14, // methods + 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors @@ -60,17 +62,19 @@ static const uint qt_meta_data_MainWindow[] = { 0, // signalCount // slots: name, argc, parameters, tag, flags - 1, 0, 39, 2, 0x08 /* Private */, - 3, 0, 40, 2, 0x08 /* Private */, - 4, 0, 41, 2, 0x08 /* Private */, - 5, 0, 42, 2, 0x08 /* Private */, - 6, 0, 43, 2, 0x08 /* Private */, + 1, 0, 44, 2, 0x08 /* Private */, + 3, 0, 45, 2, 0x08 /* Private */, + 4, 0, 46, 2, 0x08 /* Private */, + 5, 0, 47, 2, 0x08 /* Private */, + 6, 0, 48, 2, 0x08 /* Private */, + 7, 0, 49, 2, 0x08 /* Private */, // slots: parameters QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, + QMetaType::Void, QMetaType::Void, 0 // eod @@ -87,6 +91,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, case 2: _t->on_pushButton_3_clicked(); break; case 3: _t->on_pushButton_4_clicked(); break; case 4: _t->on_pushButton_5_clicked(); break; + case 5: _t->on_pushButton_6_clicked(); break; default: ; } } @@ -118,13 +123,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 5) + if (_id < 6) qt_static_metacall(this, _c, _id, _a); - _id -= 5; + _id -= 6; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 5) + if (_id < 6) *reinterpret_cast(_a[0]) = -1; - _id -= 5; + _id -= 6; } return _id; } diff --git a/Matlab_Octave_API/___librador/demo/librademo/ui_mainwindow.h b/Matlab_Octave_API/___librador/demo/librademo/ui_mainwindow.h index 5c8375a5..c9f4fc7d 100644 --- a/Matlab_Octave_API/___librador/demo/librademo/ui_mainwindow.h +++ b/Matlab_Octave_API/___librador/demo/librademo/ui_mainwindow.h @@ -35,6 +35,7 @@ public: QPushButton *pushButton; QPushButton *pushButton_2; QPushButton *pushButton_3; + QPushButton *pushButton_6; QPushButton *pushButton_4; QPushButton *pushButton_5; QCustomPlot *widget; @@ -71,6 +72,11 @@ public: verticalLayout->addWidget(pushButton_3); + pushButton_6 = new QPushButton(centralWidget); + pushButton_6->setObjectName(QStringLiteral("pushButton_6")); + + verticalLayout->addWidget(pushButton_6); + pushButton_4 = new QPushButton(centralWidget); pushButton_4->setObjectName(QStringLiteral("pushButton_4")); @@ -112,6 +118,7 @@ public: pushButton->setText(QApplication::translate("MainWindow", "Open API", nullptr)); pushButton_2->setText(QApplication::translate("MainWindow", "Close API", nullptr)); pushButton_3->setText(QApplication::translate("MainWindow", "Setup USB", nullptr)); + pushButton_6->setText(QApplication::translate("MainWindow", "Reset USB", nullptr)); pushButton_4->setText(QApplication::translate("MainWindow", "avrDebug()", nullptr)); pushButton_5->setText(QApplication::translate("MainWindow", "Get Scope Data", nullptr)); } // retranslateUi diff --git a/Matlab_Octave_API/___librador/librador/librador.cpp b/Matlab_Octave_API/___librador/librador/librador.cpp index f9d8b32e..948422f5 100644 --- a/Matlab_Octave_API/___librador/librador/librador.cpp +++ b/Matlab_Octave_API/___librador/librador/librador.cpp @@ -63,3 +63,11 @@ int librador_avr_debug(){ std::vector * librador_get_iso_data(int numToGet, int interval_samples, int delay_sample, int filter_mode){ return internal_librador_object->usb_driver->getMany_double(numToGet, interval_samples, delay_sample, filter_mode); } + +int librador_reset_usb(){ + printf("\n\n\nlibrador_reset_usb() received\n"); + delete internal_librador_object->usb_driver; + internal_librador_object->usb_driver = new usbCallHandler(LABRADOR_VID, LABRADOR_PID); + + return 0; +} diff --git a/Matlab_Octave_API/___librador/librador/librador.h b/Matlab_Octave_API/___librador/librador/librador.h index a5da418d..6e9c5ff6 100644 --- a/Matlab_Octave_API/___librador/librador/librador.h +++ b/Matlab_Octave_API/___librador/librador/librador.h @@ -6,6 +6,7 @@ int LIBRADORSHARED_EXPORT librador_init(); int LIBRADORSHARED_EXPORT librador_exit(); int LIBRADORSHARED_EXPORT librador_setup_usb(); +int LIBRADORSHARED_EXPORT librador_reset_usb(); int LIBRADORSHARED_EXPORT librador_avr_debug(); std::vector * LIBRADORSHARED_EXPORT librador_get_iso_data(int numToGet, int interval_samples, int delay_sample, int filter_mode); diff --git a/Matlab_Octave_API/___librador/librador/usbcallhandler.cpp b/Matlab_Octave_API/___librador/librador/usbcallhandler.cpp index ec9606db..9d3388c8 100644 --- a/Matlab_Octave_API/___librador/librador/usbcallhandler.cpp +++ b/Matlab_Octave_API/___librador/librador/usbcallhandler.cpp @@ -2,6 +2,44 @@ #include #include "o1buffer.h" +#include +#include +#include + +std::mutex usb_shutdown_mutex; +bool usb_shutdown_requested = false; +int usb_shutdown_remaining_transfers = NUM_FUTURE_CTX; +bool thread_active = true; + +int begin_usb_thread_shutdown(){ + usb_shutdown_mutex.lock(); + usb_shutdown_requested = true; + usb_shutdown_mutex.unlock(); + return 0; +} + +bool usb_iso_needs_rearming(){ + bool tempReturn; + usb_shutdown_mutex.lock(); + tempReturn = !usb_shutdown_requested; + usb_shutdown_mutex.unlock(); + return tempReturn; +} + +int decrement_remaining_transfers(){ + usb_shutdown_mutex.lock(); + usb_shutdown_remaining_transfers--; + usb_shutdown_mutex.unlock(); + return 0; +} + +bool safe_to_exit_thread(){ + bool tempReturn; + usb_shutdown_mutex.lock(); + tempReturn = (usb_shutdown_remaining_transfers == 0); + usb_shutdown_mutex.unlock(); + return tempReturn; +} //shared vars o1buffer *internal_o1_buffer; @@ -9,25 +47,29 @@ o1buffer *internal_o1_buffer; static void LIBUSB_CALL isoCallback(struct libusb_transfer * transfer){ //Thread mutex?? - - if(transfer->status!=LIBUSB_TRANSFER_CANCELLED){ - printf("Copy the data...\n"); - //TODO: a switch statement here to handle all the modes. - for(int i=0;inum_iso_packets;i++){ - unsigned char *packetPointer = libusb_get_iso_packet_buffer_simple(transfer, i); + printf("Copy the data...\n"); + for(int i=0;inum_iso_packets;i++){ + unsigned char *packetPointer = libusb_get_iso_packet_buffer_simple(transfer, i); + if(transfer->actual_length){ printf("Expected length is %d\n", transfer->length); printf("Actual length is %d\n", transfer->actual_length); - for(int k=0; kactual_length; k++){ - printf("%d ", packetPointer[k]); - } printf("\n"); - internal_o1_buffer->addVector(packetPointer, 375); } - printf("Re-arm the endpoint...\n"); - int error = 0;//libusb_submit_transfer(transfer); + //TODO: a switch statement here to handle all the modes. + internal_o1_buffer->addVector(packetPointer, 375); + } + printf("Re-arm the endpoint...\n"); + if(usb_iso_needs_rearming()){ + int error = libusb_submit_transfer(transfer); if(error){ printf("Error re-arming the endpoint!\n"); + begin_usb_thread_shutdown(); + decrement_remaining_transfers(); + printf("Transfer not being rearmed! %d armed transfers remaining\n", usb_shutdown_remaining_transfers); } + } else { + decrement_remaining_transfers(); + printf("Transfer not being rearmed! %d armed transfers remaining\n", usb_shutdown_remaining_transfers); } return; } @@ -37,7 +79,7 @@ void usb_polling_function(libusb_context *ctx){ struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0;//ISO_PACKETS_PER_CTX*4000; - while(1){ + while(!safe_to_exit_thread()){ printf("usb_polling_function begin loop\n"); if(libusb_event_handling_ok(ctx)){ libusb_handle_events_timeout(ctx, &tv); @@ -56,10 +98,42 @@ usbCallHandler::usbCallHandler(unsigned short VID_in, unsigned short PID_in) } internal_o1_buffer = new o1buffer(); + + //In case it was deleted before; reset the shared variables. + usb_shutdown_requested = false; + usb_shutdown_remaining_transfers = NUM_FUTURE_CTX; + thread_active = true; } usbCallHandler::~usbCallHandler(){ //Kill off usb_polling_thread. Maybe join then get it to detect its own timeout condition. + printf("Calling destructor for librador USB call handler\n"); + begin_usb_thread_shutdown(); + + printf("Shutting down USB polling thread...\n"); + usb_polling_thread->join(); + printf("USB polling thread stopped.\n"); + delete usb_polling_thread; + + for (int i=0; i #define NUM_ISO_ENDPOINTS (1) -#define NUM_FUTURE_CTX (2) +#define NUM_FUTURE_CTX (4) #define ISO_PACKET_SIZE (750) -#define ISO_PACKETS_PER_CTX (125) +#define ISO_PACKETS_PER_CTX (33) //EVERYTHING MUST BE SENT ONE BYTE AT A TIME, HIGH AND LOW BYTES SEPARATE, IN ORDER TO AVOID ISSUES WITH ENDIANNESS. typedef struct uds{