Added PSU Calibration

This commit is contained in:
EspoTek 2018-06-04 19:07:21 +10:00
parent 54a0362f86
commit b9f37da420
8 changed files with 833 additions and 6 deletions

View File

@ -9,7 +9,7 @@
#ifndef GLOBALS_H_
#define GLOBALS_H_
#define SINGLE_ENDPOINT_INTERFACE
//#define SINGLE_ENDPOINT_INTERFACE
//#define VERO
#define OVERCLOCK 48

View File

@ -0,0 +1,706 @@
:1000000018C1000032C1000030C100002EC1000044
:100010002CC100002AC100000C9403090C941209A1
:1000200024C1000022C1000020C100001EC1000048
:100030001CC100001AC1000018C1000016C1000058
:1000400014C1000012C1000010C100000EC1000068
:100050000CC100000AC1000008C1000006C1000078
:100060000C94EE090C94F90900C10000FEC00000D8
:10007000FCC00000FAC00000F8C00000F6C000009C
:10008000F4C00000F2C00000F0C00000EEC00000AC
:10009000ECC00000EAC00000E8C00000E6C00000BC
:1000A000E4C00000E2C00000E0C00000DEC00000CC
:1000B000DCC00000DAC00000D8C00000D6C00000DC
:1000C000D4C00000D2C00000D0C00000CEC00000EC
:1000D000CCC00000CAC00000C8C00000C6C00000FC
:1000E000C4C00000C2C00000C0C00000BEC000000C
:1000F000BCC00000BAC00000B8C00000B6C000001C
:10010000B4C00000B2C00000B0C00000AEC000002B
:10011000ACC00000AAC00000A8C00000A1C400003C
:10012000A4C00000A2C00000A0C000009EC000004B
:100130009CC000009AC0000098C0000096C000005B
:1001400094C0000092C0000090C000000C946309AD
:100150008CC000008AC0000088C0000086C000007B
:1001600084C0000082C0000080C000007EC000008B
:100170007CC000007AC0000078C0000076C000009B
:1001800074C0000072C0000070C000006EC00000AB
:100190006CC000006AC0000068C0000066C00000BB
:1001A00064C0000062C0000060C000005EC00000CB
:1001B0005CC000005AC0000058C0000056C00000DB
:1001C00054C0000052C0000050C000004EC00000EB
:1001D0004CC000004AC0000048C0000046C00000FB
:1001E00044C0000042C0000040C000003EC000000B
:1001F0003CC000000C94DC130C9494140D040F0408
:10020000110413041504170419041B04C50BEB0B8C
:10021000120C3B0C440C490C8E0C930CB20CB90C18
:10022000C10C550C5D0C650C700C720C740C7C0CC4
:10023000840C11241FBECFEFCDBFDFE2DEBF10E282
:10024000A0E0B0E2EAE4FBE202C005900D92AA3B16
:10025000B107D9F72DE2AAEBB0E201C01D92AC3F85
:10026000B207E1F791D20C94A315CACE84E0809333
:1002700056008CE1BDD3809363008BEB80936600C6
:1002800080E88093650081E08093600088ED84BF02
:100290001092410083E080935000809151008330A0
:1002A000E1F78091500081608093500088E1809355
:1002B00055008091510080FFFCCF809150008061FB
:1002C000809350008091510084FFFCCF88ED84BF63
:1002D00084E0809340000895E0E7F0E085818E7F20
:1002E0008583E0E0FAE08FEB9DE586A397A380EE9F
:1002F0009EE280A391A382E0808308958091200AEA
:100300009091210A813E2EE2920718F020919E23BF
:1003100006C0803E2EE2920721F020919B2320937D
:100320006A0020910520222321F080910520815030
:1003300033C0885F9A42813D974080F11092BA2085
:100340008091BB209091BC20A091BD20B091BE2097
:100350000196A11DB11D8093BB209093BC20A0935A
:10036000BD20B093BE208091BB209091BC20A09175
:10037000BD20B091BE20892F9A2FAB2FBB27809331
:10038000BE238091BB209091BC20A091BD20B09154
:10039000BE208093BD2386E08093052080910720B6
:1003A000909108200196B1F4809109208F3F91F03F
:1003B00080910620811106C0809106208150809393
:1003C00006200895809114019091150180930720D3
:1003D000909308200895009709F45EC00CF457C06C
:1003E00040E020916B0030E020939C2330939D23CC
:1003F00020919C2330919D233695322F22273795CB
:10040000279520939C2330939D2350916A0020913F
:100410009C2330919D23250F311D20939C233093E5
:100420009D23000020919C2330919D23281739079C
:1004300028F410929C2310929D23089520919C23D0
:1004400030919D23280F391F2115304238F08FEF4E
:100450009FE180939C2390939D23089520919C235A
:1004600030919D23442329F0A901481B590BCA014F
:1004700002C0820F931F80939C2390939D238091B1
:100480009C2390919D238F7780936A000895919586
:100490008195910941E0A5CF0895CF93DF93C09155
:1004A000200AD091210A80910320909104209E017E
:1004B000281B390B20939F233093A0238091BA20CF
:1004C00081114BC080919F239091A0238E3C9F4F20
:1004D000D4F480919F239091A0238B369F4F9CF062
:1004E00080910220882321F080910220815008C051
:1004F00080916A0080939E2381E08093BA208CE0F3
:10050000809302202AC08CE08093022080919F2358
:100510009091A0238A369F4F1CF08FEF9FEF02C06F
:1005200081E090E08093992390939A2380919F2378
:100530009091A0232091992330919A2360E370E059
:100540000E947A15261B370B2093992330939A2308
:100550008091992390919A233EDF8091BA20813037
:1005600029F580919F239091A023C39794F08091C7
:100570000220882331F08091022081508093022054
:1005800015C080916A0080939B2383E08093BA20FA
:100590000DC080919F239091A023873991051CF471
:1005A00081E090E002C08FEF9FEF15DFC093032042
:1005B000D0930420DF91CF9108958617970779F0A3
:1005C0006817790728F49C01261B370BB90109C06D
:1005D0008617970718F4681B790B03C0089560E02D
:1005E00070E0CB010895CF93DF938091002090912C
:1005F0000120892B51F080910020909101200197DA
:10060000809300209093012043C080E490E0809389
:10061000002090930120809107209091082001965E
:10062000B9F1809114019091150120910920263093
:1006300018F467E771E002C06EEE72E00E94661582
:10064000EC0180910720909108208C179D0758F4A9
:100650006091072070910820CE01AFDF029718F05B
:1006600080EC9DE511C08091072090910820C8176B
:10067000D90770F46091072070910820CE019DDFAA
:10068000029730F08FEB9DE58093360A9093370AFE
:10069000DF91CF910895AC01460F571F861B970B32
:1006A0002091200A3091210A24173507C8F720919C
:1006B000200A3091210A8217930790F70895E0E805
:1006C000F6E08FE0808385E0848308951F93CF93C5
:1006D000DF93C0E4D0E0198180E4898340E250E0F8
:1006E00064ED7DE280E290E00E94280F1983DF91A3
:1006F000CF911F9108951F93CF93DF93C0E4D0E073
:10070000198180E4898387ED97E20E945E0F81E082
:100710000E94700F1983DF91CF911F910895089562
:100720000F931F93842F50E0415851099DE7949FE8
:100730009001959F300D112490910920953048F437
:10074000843810F029583E4F9091C42067E771E03B
:1007500004C09091C4206EEE72E0969FA001979F16
:10076000500D1124420F531F4850584D00E913E01B
:100770002DE730E060E00E9419131F910F9108955A
:100780001CBEEEEFF0E40994A1DF8091D42D882304
:1007900069F080E2E4EDFDE2A7EDB7E201900D9291
:1007A0008A95E1F71092D727A6DFEADF87E08093EA
:1007B000A20078945BDDB3DF77D765D188D160E0A4
:1007C00080E01FD10BD18CE0FFD03BD5DFD5F8D531
:1007D00076DF60EA70E28AEA93E20E949C150000EC
:1007E0000000000000000000000000000000000009
:1007F000000000000000000000008091BF2088235E
:1008000071F3E091D6258E2F90E088309105A0F409
:10081000FC01E250FF4F0C948D1584D10DC0F2D134
:100820000BC077D209C0F9D207C083D305C007D463
:1008300003C006D401C075D41092BF20D0CF089554
:100840000895809114018093B323809115018093C2
:10085000B423809124018093B52380912501809356
:10086000B6238091200A8093BF238091210A809330
:10087000C02380911401909115018634914080F03D
:100880008091140190911501893A914048F480912A
:100890001401909115018093F42D9093F52D000093
:1008A0008091C220882339F017DD1092C22081E0A8
:1008B0008093C12008958091C120882341F08091C8
:1008C000BA20833019F41ADD8EDE01C0E6DD809196
:1008D000C020882351F080911401909115018093DC
:1008E000F42D9093F52D1092C02080910920209135
:1008F000140130911501853028F481E0273731400B
:1009000030F004C081E02E3E324008F080E0809359
:10091000C42008950F931F9381E08093C720809394
:10092000C22000E913E02DE730E048EF57E260E035
:1009300081E80E9419132DE730E045E758E260E0B6
:1009400082E80E9419132DE730E042EF58E260E0A0
:1009500083E80E9419132DE730E04FE659E260E08A
:1009600084E80E9419132DE730E04CEE59E260E074
:1009700085E80E9419132DE730E049E65AE260E06D
:1009800086E80E94191381E01F910F91089510923B
:10099000C720089581E0089581E008951092200213
:1009A000982F9C7193689093200287FF03C080E189
:1009B00092E002C080E090E0892B809321021092A7
:1009C0002202109226020895E0E0F2E010AA836865
:1009D00080AB80E181AB12AA16AA0895E0E0F2E0B4
:1009E00010A683E880A78FE281A712A616A6089515
:1009F000AAECB1E092E09C93E82FF0E084911C9285
:100A00000895909171009D7F909371001092000263
:100A1000623011F09CE101C09EE19093010290E4EC
:100A200090930202811102C080E401C080EC8093A7
:100A30000302613011F084E001C083E0809304027E
:100A400080E2D6DF80930C0281E2D2DF80930D0238
:100A5000109218021092190281E080930002BECF1A
:100A60001F920F920FB60F9211248F930000000077
:100A70000000000081E0809323028F910F900FBE51
:100A80000F901F901895CF93DF93E0E7F0E08281FD
:100A90008B7F8283C0E2D3E08DE0888380E489830A
:100AA00089E08A8383E3A4DF888782E3A1DF8987E3
:100AB00087E39EDF8A8786E39BDF8B87E0E2F6E0B1
:100AC0008081836080831482DF91CF910895E0E775
:100AD000F0E080818E7F808383E880930001089519
:100AE000E0E0F1E0108A80E4808B10A280A310AADD
:100AF00080ABE0E4F1E0108280831092C620109277
:100B0000C5201092C4201092A8231092A9231092FD
:100B1000A6231092A72308958093D62581E0809381
:100B2000BF200895CF93DF9310920920D9DFC0E052
:100B3000D1E01EAA84E288AB19AA49E54AAB32E0AB
:100B40003BAB60910B2070910C206CAB7DAB67EDE3
:100B500075E268AF79AF1AAE9BE39CAF93E09DAFAF
:100B60001EAE28A9206828AB10924601E0E4F1E00F
:100B70008083109241014093420190934301409140
:100B80000D2050910E20409344015093450146ECB6
:100B900053E2409348015093490110924A0129E3DE
:100BA00020934C0190934D0110924E0190819068DA
:100BB0009083188A90E4988B888B198A95E99A8B90
:100BC00090E19B8B4EEE52E04C8B5D8B888F398F82
:100BD0001A8E88EF97E28C8F9D8F1E8E68EC70E0E6
:100BE00084EF91E058DD88EC90E0809307209093AB
:100BF000082081E08093062088898068888BDF91B7
:100C0000CF9108951F93CF93DF9311E010930920A4
:100C100067DFC0E0D1E018AA80E488AB84E088AB4D
:100C200019AA1AAA4BE44BAB1CAA1DAA1EAA8AE059
:100C300090E288AF99AF1AAE60EA6CAF38E03DAF92
:100C40001EAE88A9806A88ABE0EAF8E085E580837B
:100C5000808310924601E0E4F1E084E28083109208
:100C6000410199E59093420122E020934301A09134
:100C70000B20B0910C20A0934401B0934501A7ED47
:100C8000B5E2A0934801B093490110924A019BE359
:100C900090934C0193E090934D0110924E019081FE
:100CA0009068908388A319A295E99AA34BA34EEE6E
:100CB00052E04CA35DA368A739A71AA666EE7AE2B4
:100CC0006CA77DA71EA6888B198A9A8B90E19B8BB7
:100CD0004C8B5D8B888F298F1A8E88EF97E28C8FD3
:100CE0009D8F1E8E68EC70E084EF91E0D4DC88EC80
:100CF00090E080930720909308201093062088A10D
:100D0000806888A388898068888BDF91CF911F9144
:100D100008951F93CF93DF9312E010930920E0DE34
:100D2000C0E0D1E01EAA84E288AB19AA39E53AAB4B
:100D30001BAB40910B2050910C204CAB5DAB47EDB1
:100D400055E248AF59AF1AAE9BE39CAF93E09DAF1D
:100D50001EAE28A9206828AB10924601E0E4F1E01D
:100D6000808310924101309342019093430120917E
:100D70000D2030910E20209344013093450126EC44
:100D800033E2209348013093490110924A0129E34C
:100D900020934C0190934D0110924E0190819068E8
:100DA0009083188A90E4988B888B198A45E94A8B3E
:100DB00090E19B8B2EEE32E02C8B3D8B888F198F30
:100DC0001A8E68EF77E26C8F7D8F1E8E88A319A232
:100DD0004AA39BA32CA33DA384E388A719A71AA623
:100DE00086EE9AE28CA79DA71EA668EC70E084EFC1
:100DF00091E051DC88EC90E08093072090930820EC
:100E000081E08093062088898068888B88A180682B
:100E100088A3DF91CF911F9108951F93CF93DF9304
:100E200013E0109309205CDEC0E0D1E0109246018F
:100E3000E0E4F1E084E280831092410129E520930F
:100E4000420192E09093430140910B2050910C207D
:100E5000409344015093450147ED55E240934801CA
:100E60005093490110924A019BE390934C011093D7
:100E70004D0110924E019081906890831EAA88AB1C
:100E800019AA2AAB1BAB20910D2030910E202CAB60
:100E90003DAB26EC33E228AF39AF1AAE99E39CAFF5
:100EA0001DAF1EAE98A9906898AB18A250E458A345
:100EB00094E098A319A21AA24BE44BA31CA21DA272
:100EC0001EA22AE030E228A739A71AA630EA3CA7DA
:100ED00028E02DA71EA698A1906A98A395E5909367
:100EE000A008188A588B888B198A85E98A8B4B8BC6
:100EF0008EEE92E08C8B9D8B388F298F1A8E88EF27
:100F000097E28C8F9D8F1E8E68EC70E084EF91E0ED
:100F1000C2DB88EC90E0809307209093082081E06A
:100F20008093062088898068888BDF91CF911F91FC
:100F300008951F93CF93DF9314E010930920D0DD21
:100F4000C0E0D1E018AA80E488AB18AB19AA1AAAAD
:100F50003BE43BAB1CAA1DAA1EAA8AE090E288AF24
:100F600099AF1AAE50EA5CAF88E08DAF1EAE98A97B
:100F7000906A98AB95E59093A00810924601E0E442
:100F8000F1E094E290831092410129E5209342011F
:100F900022E02093430160910B2070910C2060931C
:100FA00044017093450167ED75E2609348017093C9
:100FB000490110924A012BE320934C0123E0209336
:100FC0004D0110924E01208120682083988B198A50
:100FD00045E94A8B3B8B2EEE32E02C8B3D8B588FB4
:100FE000898F1A8E68EF77E26C8F7D8F1E8E98A3A3
:100FF00019A24AA39AE49BA32CA33DA393EC98A720
:1010000089A71AA686EE9AE28CA79DA71EA668EC71
:1010100070E084EF91E03FDB88EC90E08093072064
:101020009093082081E08093062088898068888BCF
:1010300088A1806888A3DF91CF911F910895FFCF89
:10104000CF93DF9386E0809309204ADDC0E0D1E0B2
:101050001EAA84E288AB19AA39E53AAB93E09BABB0
:1010600040910D2050910E204CAB5DAB46EC53E20D
:1010700048AF59AF1AAE29E32CAF9DAF1EAE28A9D9
:10108000206828AB10924601E0E4F1E080831092E2
:1010900041013093420122E02093430140910B2013
:1010A00050910C20409344015093450147ED55E287
:1010B000409348015093490110924A013BE3309319
:1010C0004C0190934D0110924E0190819068908355
:1010D000188A90E4988B888B198A95E99A8B90E10D
:1010E0009B8B4CED55E04C8B5D8B888F298F1A8E36
:1010F00088EF97E28C8F9D8F1E8E68EC70E084EFF6
:1011000091E0C9DA80E991E080930720909308206C
:1011100081E08093062088898068888BDF91CF9159
:101120000895CF93DF9387E080930920D9DCC0E056
:10113000D1E01EAA84E288AB19AA39E53AAB93E064
:101140009BAB40910D2050910E204CAB5DAB46EC1B
:1011500053E248AF59AF1AAE29E32CAF9DAF1EAE94
:1011600028A9206828AB10924601E0E4F1E08083D2
:10117000109241013093420122E0209343014091BB
:101180000B2050910C20409344015093450147EDB2
:1011900055E2409348015093490110924A013BE3C4
:1011A00030934C0190934D0110924E0190819068C4
:1011B0009083188A90E4988B95E2988B198A95E928
:1011C0009A8B90E19B8B4CED55E04C8B5D8B888F1F
:1011D000298F1A8E88EF97E28C8F9D8F1E8E68EC78
:1011E00070E084EF91E057DA80E991E08093072086
:1011F0009093082081E08093062088898068888BFE
:10120000DF91CF9108951F920F920FB60F92112484
:101210008F9381E0809303018F910F900FBE0F9009
:101220001F9018951F920F920FB60F9211248F9353
:1012300082E0809303018F910F900FBE0F901F905B
:101240001895E0E7F0E083818C7F838384818C7F35
:10125000848380818D7F8083E0E8F1E080EC82836D
:10126000128688EC81831186A0E0B8E034E03C93DC
:1012700023E011962C93119714961C92149785EDE8
:1012800091E096968D939C93979716961C9216973D
:10129000E0E4F8E030832183148286A397A31682CA
:1012A000E0E6F6E0808180618083E0E4F9E083E1BC
:1012B0008183148282E08683A6A3B7A310A611A619
:1012C00081E0808308951F920F920FB60F92112430
:1012D0002F933F934F935F938F939F93CF93DF937E
:1012E0001F92CDB7DEB78FEF80934C098091092014
:1012F000873031F480912C02898390912D0202C0B5
:1013000090912C028091C320891B20916809309113
:10131000690982308CF02A3F374070F420916809C7
:101320003091690989301CF481E090E002C086E0C8
:1013300090E0820F931F18C02091680930916909CD
:101340008F3FB4F42730310598F02091680930912F
:101350006909883F1CF081E090E002C086E090E0DF
:10136000A901481B590BCA01809378099093790908
:101370000F90DF91CF919F918F915F914F913F910E
:101380002F910F900FBE0F901F901895E0E7F0E09F
:1013900083818F7E8383E0E4F6E080818A6A8083A4
:1013A0008FEF848388E5828BE0EAF8E080E3838333
:1013B00084EC858387E08683178288E1848308959F
:1013C000E0E7F0E08381877F8383E0ECF8E011823F
:1013D00088E58093550680E6808308951F920F92DA
:1013E0000FB60F92112400000F900FBE0F901F90A8
:1013F00018951F920F920FB60F9211248F93EF93AF
:10140000FF93E0EAF8E080818083FF91EF918F9174
:101410000F900FBE0F901F9018959FB7F894A0E5FE
:10142000B0E016968C911697897F16968C93169736
:10143000E0E6F0E080E885838BEB868316968C915E
:101440001697846016968C938081816080839FBFFD
:1014500008959FB7F894E82FF0E0E059FF4F6095AA
:101460008081682360839FBF0895CF93863011F0F9
:10147000C0E001C0C8E18091510081FD0DC09FB75F
:10148000F894809150008260809350009FBF8091BB
:10149000510081FFFCCFC1DF6C2F636084E490E0DA
:1014A000BCD460E480E0CF91D4CF8091C82008956F
:1014B0008091C820813009F46ACA0895F0D0FC01F7
:1014C00083818093C820811101C024CA81E00895DE
:1014D0009091C625892F807697FF07C0803491F4BC
:1014E0008091C72581110EC057CA803459F480916C
:1014F000C725811107C08091CC259091CD25892BDE
:1015000009F048CA80E008958091C8258F770C942F
:10151000A3129091D020911102C080E00895E09133
:10152000CD20F091CE200190F081E02D948189179B
:10153000A0F7E093CB20F093CC20228133812E0FB3
:101540003F1FE217F30798F49181943061F4928180
:10155000891309C09381691306C0E093CB20F093EF
:10156000CC2081E008959081E90FF11DEACFE0934E
:10157000CB20F093CC20D1CFE091CD20F091CE20A4
:101580000190F081E02D228133812E0F3F1FFC015D
:101590004081E40FF11DE217F30748F481818430A4
:1015A00031F0853039F08081E80FF11DF4CF80E013
:1015B00090E00895CF0108951F93CF93DF93182FE4
:1015C000A8DF882339F1C091CB20D091CC20CE0167
:1015D000D3DFEC01892B41F04C815D816B818A81E5
:1015E000BFD78111F4CF16C0E091CD20F091CE206D
:1015F00092818381E92FF82FE10FF11DE10FF11D99
:101600000190F081E02D0190F081E02DDF91CF91EC
:101610001F91099480E0DF91CF911F910895EF927F
:10162000FF921F93CF93DF93C82F60E072DF811189
:1016300002C010E02DC0E091CD20F091CE2092812B
:101640008381E92FF82FEC0FF11DEC0FF11DE080E5
:10165000F180D7011696ED91FC9117970995682FA7
:101660008C2F57DF182F882321F3C091CB20D091E6
:10167000CC20CE0181DFEC01892B21F08A810E94F0
:10168000C313F7CFD7011296ED91FC9113970995EB
:10169000812FDF91CF911F91FF90EF90089580915E
:1016A000CB209091CC200895E2C6CF938091D0209A
:1016B000882311F0C0E008C01092D0201092D420EE
:1016C0001092D520CF910895E091CD20F091CE20B9
:1016D0000190F081E02D8481C81770F78C2F9FDF77
:1016E000CF5FF2CFCF938091D0208823F1F0C0E07C
:1016F000E091CD20F091CE20A081B18114968C9103
:10170000C81798F492818381E92FF82FEC0FF11D0F
:10171000EC0FF11D0190F081E02D0084F185E02DAA
:10172000309709F00995CF5FE3CFCF9108950F93DC
:101730001F93CF93DF931092D0251092D125109252
:10174000D2251092D3251092D4251092D5258091C0
:10175000C62587FF07C02091CC253091CD25232BAE
:1017600009F455C38076803409F00FC1E091C72594
:101770008E2F90E0FC01E05AF109EB30F10508F002
:1017800004C1EA5FFE4F0C948D1581E08093C02068
:1017900080910720909108208093B72380910720A3
:1017A000909108209093B82380919E238093B92331
:1017B00080919B238093BA2380916A008093BB23FE
:1017C00080916B008093BC236091CC257091CD25D6
:1017D0008AEA93E2D4C0109200088091C8259091C3
:1017E000C92580933608909337088091CA258F7059
:1017F000809300086091CC257091CD2586EC93E212
:10180000A8D68091CC259091CD2520910D203091A6
:101810000E208217930709F4C5C280930D20909380
:101820000E2026C0109240088091C8259091C925AD
:1018300080937608909377088091CA258F70809363
:1018400040086091CC257091CD2587ED95E281D639
:101850008091CC259091CD2520910B2030910C20AA
:101860008217930709F49EC280930B2090930C205B
:101870008091092051C010926809109269098091E5
:10188000C8258093C3208EC28091C82580932406EA
:1018900089C2E091C825F091C925E830F10508F02A
:1018A00074C0EF5EFE4F0C948D1560E080E0A9D807
:1018B0008091CA2573D880E02FC060E080E0A1D875
:1018C0008091CA256BD881E027C061E081E099D87A
:1018D0008091CA2563D88091CB2576D882E01CC040
:1018E00083E01AC084E018C060E080E08AD880916C
:1018F000CA2554D885E010C061E080E082D880918C
:10190000CA254CD886E008C062E080E07AD8809191
:10191000CA25806843D887E0FFD844C28091C82593
:10192000809384063FC28091C8259091C925892B58
:1019300091F00E94660380E2E4EDFDE2A7EDB7E2DC
:1019400001900D928A95E1F781E08093D7270E945C
:101950007B030E946603E9E7F0E091E088EDF894EC
:1019600084BF90836091CC257091CD258AEA90E266
:1019700006C06091CC257091CD2589EA90E2E9D529
:1019800011C20E948A0481110DC28091C625982F30
:10199000907609F0C9C187FFFBC02091CC2530911A
:1019A000CD252115310509F4BFC18F7109F09EC005
:1019B0008091C725863071F0883009F48EC081117E
:1019C000B3C12230310509F0AFC162E070E084EDAF
:1019D00090E2D5CF8091C8259091C925292F332732
:1019E00022303105A1F060F42130310509F09CC1AD
:1019F0008091192090911A20DC016C9170E05BC0FD
:101A00002330310589F12F30310509F18DC1E09185
:101A10001920F0911A202189821708F085C1992791
:101A2000880F991F880F991FE0911B20F0911C20AF
:101A3000E80FF91F80819181FC016281738189D552
:101A4000E091CE25F091CF2582E0818335C0809151
:101A50001D2090911E20009709F466C1DC011296AA
:101A60006D917C91139727C099278130910569F07A
:101A700038F0029709F058C168E08AE890E208C09F
:101A800064E070E08CE990E216C067E083E990E2E0
:101A9000282FAAE7B0E2FC01819190E08D939D93FD
:101AA0008E2F821B8617C0F3660F6E5F60937820BF
:101AB00070E088E790E24DD58091CC259091CD25BE
:101AC0002091D0253091D1258217930708F06AC163
:101AD0008093D0259093D12565C12130310509F03F
:101AE00023C161E070E080ED90E249CF8130C1F523
:101AF0008091C7258A3009F017C12130310509F0DE
:101B000013C18091D020882309F40EC1C091CA2549
:101B1000D091CB250091CD201091CE20D801ED9110
:101B2000FC918481C81708F0FFC060E08C2FF1DCC5
:101B3000882309F4F9C0DD27CC0FDD1FF80182816D
:101B40009381C80FD91FE881F9810680F781E02DC4
:101B500009958093D22061E070E082ED90E20FCF92
:101B6000823009F0E1C08091C7258111DDC02230AB
:101B7000310509F0D9C08091CA253BD590E080930A
:101B8000C9209093CA2062E070E089EC90E2F7CE21
:101B90008F7109F07DC08091C725833009F4C4C0DE
:101BA00018F48130A1F0C0C0853019F0893039F1C6
:101BB000BBC08091CC259091CD25892B09F0B4C074
:101BC00084E89AE08093D2259093D325EBC080914E
:101BD000CC259091CD25892B09F0A6C08091C825F0
:101BE0009091C925019709F09FC08091D4209091D0
:101BF000D5208D7F8093D4209093D520D3C0809121
:101C0000CC259091CD25892B09F08EC09FD48823B7
:101C100009F48AC02091C8253091C9253327E09165
:101C20001920F0911A20818990E08217930708F417
:101C30007BC03BDD8091C8259091C9258093D02041
:101C4000882309F4AFC099278150904C880F991FC1
:101C5000880F991F20911B2030911C20820F931F09
:101C60008093CD209093CE20C0E0E091CD20F091E4
:101C7000CE200190F081E02D8481C81708F092C039
:101C800060E08C2F99DC882309F44EC0CF5FEDCF44
:101C90008130E9F48091C7258B3009F045C08091EF
:101CA000CC259091CD25892B09F03EC08091D02084
:101CB000882309F439C0C091CA25D091C8258C2F3A
:101CC000AEDC882389F16D2F8C2F76DC2BC082301F
:101CD00059F58091C725813019F0833089F024C0EF
:101CE0008091CC259091CD25892BF1F48091C82548
:101CF0009091C925892BC1F48091CA2581D412C045
:101D00008091CC259091CD25892B71F48091C825A7
:101D10009091C925892B41F48091CA2504D58091E1
:101D2000CA253AD581113EC08091C6258F71813078
:101D3000D9F58091D020882309F469C0C091CA25C3
:101D4000D091CB250091CD201091CE20D801ED91DE
:101D5000FC918481C81708F05AC060E08C2FD9DB51
:101D6000882311F1FE01FF27EE0FFF1FD801129605
:101D70008D919C911397E80FF91F00811181D80173
:101D80001696ED91FC9117970995682F8C2FC1DB62
:101D9000882351F0D8011496ED91FC91159709957F
:101DA000882311F081E034C08091C6258F71823084
:101DB00071F58091D020882351F1C0E0E091CD20D1
:101DC000F091CE20A081B18114968C91C817F8F4BF
:101DD00092818381E92FF82FEC0FF11DEC0FF11D9B
:101DE00000811181D8011696ED91FC911797099504
:101DF000682F8C2F8EDB882351F0D8011496ED913B
:101E0000FC91159709958111CDCFCF5FD7CF80E099
:101E1000DF91CF911F910F9108951BBEFC0128ED1A
:101E200024BF608308958091CF0187FDFCCF089582
:101E30001F93CF93DF93C0ECD1E01A858A8761E0CE
:101E40008BEC91E0EADF1A87DF91CF911F91089523
:101E5000CF92DF92EF92FF920F931F93CF93DF9376
:101E60008C017B016A01DFDFCCECD1E088818860E6
:101E70008883B801705FA601C70155D68881877F26
:101E80008883DF91CF911F910F91FF90EF90DF90AA
:101E9000CF900895CF93DF93C82FD62FC4DFACEC3B
:101EA000B1E08C9188608C93EC2FF0E0F05FD083F0
:101EB0008C91877F8C93DF91CF9108950F931F931F
:101EC000CF938C01B0DFC0E0F80161918F018C2FBE
:101ED000E1DFCF5FC032C1F7CF911F910F9108951D
:101EE000CF93C82FA0DF20E2C29FC0011124E0ECF5
:101EF000F1E012829183808385E3CF9199CF409165
:101F0000CA01E62FF72F8093CA0184914093CA013A
:101F10000895E82FF0E0EA50F24D80818F3F09F4F8
:101F2000FFCF9FB7F89480818F5F80839FBF089514
:101F3000E82FF0E0EA50F24D8081811101C0FFCF1F
:101F40009FB7F8948081815080839FBF0895CF937D
:101F5000C82F80919823C11105C0882339F081E0F2
:101F6000E7DF04C0811102C081E0D3DFC093982372
:101F7000CF910895282F2F70082E000C990B392F20
:101F8000331F3327331F832F90E0820F911D820F61
:101F9000911D23E0880F991F2A95E1F78C5D9C4DD8
:101FA00008950F93E8ECF4E080818F7D8083808139
:101FB0008F7D8083ECE2F3E202E0059310922E2302
:101FC00010922F2300E2069300E40693E4E2F3E28A
:101FD00000E2069300E40693E6ECF5E2148615862B
:101FE0001686178612861386109207230F9108957E
:101FF0000F9385E080930723EDE2F3E204E005937D
:10200000E5E2F3E204E005930F9108950F9383E076
:102010008093072310922E2310922F23ECE2F3E2F9
:1020200002E006930F910895E091D225F091D32517
:10203000309709F009940895282F2F70082E000C6E
:10204000990B392F331F3327331F832F90E0820FD3
:10205000911D820F911D029749E0489F9001499F71
:10206000300D1124C901895A9D4D0895AF92BF9238
:10207000DF92EF92FF920F931F93CF93DF93D82EAF
:10208000DBDFEC018D2D76DF7C01DC011196EC911C
:10209000E770E150E73040F4F0E0EE0FFF1FE45549
:1020A000FF4D0081118102C008E010E02D813E81CA
:1020B0008B819C814881D7FE4AC0F7016681778178
:1020C000260F371F2D833E8328173907A1F1BC0146
:1020D000621B730B9B01211574E0370738F02FEF5B
:1020E00033E0C901B801F2D4281B390B41FF0AC003
:1020F000C901B801EBD4AC0191E0452B09F090E0A7
:10210000892F01C080E0988180FB91F99883D701E5
:1021100016961D921C92179712962D933C93139727
:1021200029813A818D819E81820F931F14968D9310
:102130009C93159708C041FF78C04D7F4883168255
:10214000178212821382F70102E0069385C0D7013D
:102150001296AD90BC90139742FF0FC0E981FA81AF
:10216000B801B4D4B0E4DB9EB001112469567F4DB0
:10217000AC01CF01820F931FD6D42D813E812A0D51
:102180003B1D2D833E838B819C818217930710F426
:102190008D839E83F70126813781A216B30609F04D
:1021A00044C02D813E818217930709F43EC0AC01E3
:1021B000421B530B9A01211554E0350750F02FEFC5
:1021C00033E0C901B80182D4B901681B790BCB0196
:1021D00007C0C901B8017AD4D901A81BB90BCD0138
:1021E000F701128213828017910798F48881846026
:1021F0008883F0E4DF9EC001112489569F4DD701EA
:1022000014968D939C93159716960D931C93179780
:102210009ACF49815A812D813E81240F351FF701C4
:1022200024833583868397838ECF888180FF14C073
:102230008E7F8883EF81F885309771F06D817E8184
:102240004D2D80E0DF91CF911F910F91FF90EF9086
:10225000DF90BF90AF900994DF91CF911F910F91C4
:10226000FF90EF90DF90BF90AF9008950F93CF93C2
:10227000DF9380910723833029F4D6DEDF91CF915D
:102280000F918FCE2091032330910423C091D0254C
:10229000D091D125C21BD30B61F58091052390917C
:1022A0000623820F931F809305239093062320918A
:1022B000CC253091CD258217930721F08091D6202F
:1022C000882331F084E080930723E4E2F3E236C010
:1022D000E091D425F091D525309799F00995882380
:1022E00081F01092032310920423C091D025D09145
:1022F000D125C034D10528F01092D620C0E4D0E01A
:1023000003C081E08093D620C0932E23D0932F2347
:1023100080910323909104232091CE253091CF25E5
:10232000280F391F2093302330933123C80FD91F32
:10233000C0930323D0930423ECE2F3E202E006937C
:10234000DF91CF910F9108950F93CF938091CC049B
:1023500080FF63C021E02093CC0484E293E2FC017F
:1023600000E80693ECE2F3E200E806932093CA0447
:10237000FC0100E1069380910723882329F0835014
:10238000823008F451DE0DDE8091262390912723C0
:10239000089709F044C088E0E3ECF2E2A6ECB5E26D
:1023A00001900D928A95E1F78091C8048062809334
:1023B000C8048091C80480628093C804B8D9C82F2B
:1023C000811102C015DE2BC08091C62587FF0DC08C
:1023D00010920523109206231092032310920423D7
:1023E00082E08093072342DF1BC08091CC2590912F
:1023F000CD25892B11F40ADE13C01092052310920B
:102400000623109203231092042381E08093072374
:10241000E4E2F3E202E0069303C0C0E001C0C1E0E1
:102420008C2FCF910F910895CF93CFB7F89481E07F
:102430008EDDEAECF4E080E4808380E28083E1ECEE
:10244000F4E0808181608083A9ECB4E08C918260AB
:102450008C93E8ECF4E08081806480838C918160CF
:102460008C93808180688083CFBFCF910895CF9374
:102470001092600080E30E94350A8091C00480645D
:102480008093C00481E080936000CFB7F89480E02F
:1024900090E0FC0123E0EE0FFF1F2A95E1F7E85FD3
:1024A000FC4D158E01968E30910599F780E090E0F5
:1024B00039E0389FF001399FF00D1124E95AFD4DA4
:1024C00020812E7F208301968C30910591F76AE15F
:1024D00070E082E014DD8F3F09F48FE18093FA040D
:1024E0006BE170E082E00BDD8F3F09F48FE18093B8
:1024F000FB048091C00486608093C0048091C00476
:1025000080688093C0048091C00480618093C0047F
:1025100084E293E28093C6049093C7048091C00440
:1025200080628093C0048FEF8093C5048091C804BB
:1025300082608093C8041092982385E0EADC74DFFF
:10254000CFBFCF9108958093C30408958091C304B1
:102550000895E6ECF5E28087918762877387089596
:102560001F93CF93DF93162FEA0104DDFC018181D5
:10257000807CD1F5612F6370613019F020F080E824
:1025800003C080EC01C080E4C038D105E1F050F414
:10259000C032D105A1F0C034D10599F06097C9F4DB
:1025A00091E018C0C11592E0D90779F0CF3F93E0D0
:1025B000D90769F0C115D14061F495E00BC092E0F4
:1025C00009C093E007C094E005C096E003C097E01F
:1025D00001C090E0118226E02083982B91838181B5
:1025E0008062818381E001C080E0DF91CF911F9103
:1025F0000895C0DCFC01818182FB882780F9089561
:10260000CF93C82FB7DCFC01818182FF0FC081818D
:102610008B7F81838C2F10DDFC01908190FF06C0A1
:102620009E7F90830780F085E02D099581E0CF9112
:102630000895AF92BF92CF92DF92EF92FF920F93E5
:102640001F93CF93DF93D82EC62E5A017901F4DC65
:10265000EC018D2D8FDC9C01DC0111968C91119782
:10266000807C09F454C011968C911197807C803C39
:1026700021F011968C9182FD4AC09FB7F894888111
:1026800080FF02C09FBF43C0816088839FBFA98233
:10269000BA82EB82FC821D821E820F83188791E032
:1026A000C11004C0E114F10409F090E0888190FBAE
:1026B00081F98B7F8883D7FE02C0F90122C0D9013E
:1026C00011968C911197807C803CC1F41196EC910D
:1026D000E770E150E73040F4F0E0EE0FFF1FE45503
:1026E000FF4D6081718102C068E070E0C701EED1EA
:1026F000892B21F088818E7F888309C0F90112829D
:102700001382168217828D2DB1DC81E001C080E03A
:10271000DF91CF911F910F91FF90EF90DF90CF90BD
:10272000BF90AF900895EF92FF920F93CF93C82F71
:1027300021DC7C018C2F80DCDC01F70102E00593B9
:102740009C9190FF1BC09E7F9C931796ED91FC91EE
:102750001897309799F0D701C7FF05C016966D916D
:102760007C91179704C012966D917C9113974C2F12
:1027700081E0CF910F91FF90EF900994CF910F914D
:10278000FF90EF900895CF93C82FCDDF8C2FF2DB11
:10279000FC011182CF9108950F93CF93C82FEADBEC
:1027A000FC0181818460818301E006938C2FBBDF73
:1027B00081E0CF910F9108951F920F920FB60F9263
:1027C00011240F932F933F934F935F936F937F93B6
:1027D0008F939F93AF93BF93CF93EF93FF9380918A
:1027E000CB0487FF08C080E88093CA040E94720B64
:1027F0000E94210486C08091CB0482FF18C084E02F
:102800008093CA0480912C2386FF7BC08091CC04E6
:1028100081FD77C099DD811174C0809107238130DB
:1028200011F4F4DB6EC0843009F06BC021C08091DC
:10283000CB0481FF26C082E08093CA0480912423C8
:1028400086FF5FC08091CC0481FD5BC07DDD81117E
:1028500058C080910723823041F484E0809307239D
:10286000E4E2F3E202E006934CC0833009F049C091
:10287000EDE2F3E204E00593E5E2F3E204E0059320
:1028800040C08091CB0484FF25C080E18093CA04BE
:10289000C1E08C2F48DF8C2F806845DFCF5FC630CA
:1028A000C1F70E94550B1092C30410922523C093C8
:1028B000242383E48093252310922D23C0932C237B
:1028C00080932D2383EC92E28093282390932923F5
:1028D00068DB17C08091CB0486FF08C080E480933A
:1028E000CA0480E034DB0E941F040BC08091CB043B
:1028F00085FF07C080E28093CA0481E028DB0E9444
:102900002004FF91EF91CF91BF91AF919F918F9153
:102910007F916F915F914F913F912F910F910F9008
:102920000FBE0F901F9018951F920F920FB60F9227
:1029300011240F931F932F933F934F935F936F93A4
:102940007F938F939F93AF93BF93CF93DF93EF9337
:10295000FF938091CC0481FF1AC082E08093CC0465
:102960008091C5048195880FE4E2F3E2E81BF10948
:10297000208131812452334283E0369527958A9510
:10298000E1F7822F869520FD06C0C0E005C0DCDCA3
:10299000882319F386C0C0E8C80F8C2FEBDAFC013E
:1029A000208125FF7EC000E20693C11174C0809192
:1029B0000723843019F438DBF4DA73C0009126233E
:1029C000109127238091D0259091D125C091032388
:1029D000D091042398012C0F3D1F8217930718F400
:1029E0008C010C1B1D0B8091CE259091CF25A80149
:1029F00063EC72E28C0F9D1F96D0C00FD11FC09365
:102A00000323D09304230034110569F48091052336
:102A1000909106238C0F9D1F2091CC253091CD25C0
:102A20008217930788F0C093D025D093D125E091E9
:102A3000D425F091D525309729F00995811102C050
:102A4000D7DA2FC0E3DA2DC08091D0259091D1251F
:102A5000C817D907D9F4E091D425F091D52530973E
:102A600079F30995882361F320910523309106239A
:102A70008091032390910423820F931F8093052359
:102A8000909306231092032310920423E4E2F3E2CE
:102A900002E0069306C0C03811F4E8DB02C08C2FB8
:102AA000E5DAFF91EF91DF91CF91BF91AF919F91C7
:102AB0008F917F916F915F914F913F912F911F91D6
:102AC0000F910F900FBE0F901F901895AA1BBB1B64
:102AD00051E107C0AA1FBB1FA617B70710F0A61B1E
:102AE000B70B881F991F5A95A9F780959095BC013F
:102AF000CD01089597FB072E16F4009406D077FDBC
:102B000008D0E4DF07FC05D03EF4909581959F4FF7
:102B10000895709561957F4F0895EE0FFF1F059002
:102B2000F491E02D0994FB01DC0102C001900D92AB
:102B300041505040D8F70895FB01DC0101900D92FF
:0A2B40000020E1F70895F894FFCF9C
:102B4A0040000CE02E0AFFFFFFFF55800080005E68
:102B5A000A580A680A550A000064201F2000002843
:102B6A002023200F2000000009023C000101008000
:102B7A00FA0904000006FFFFFF0007058101800033
:102B8A000107058201800001070583018000010712
:102B9A00058401800001070585018000010705867B
:102BAA00018000011201000200000040EB0394BA08
:102BBA000002010200010000000300000000000002
:102BCA00000000000000000000004C6162726164B5
:102BDA006F72004573706F54656B0000040309043B
:102BEA006465627567313233000105001000200008
:0A2BFA004000800000010002FF030C
:00000001FF

View File

@ -48,8 +48,9 @@ void genericUsbDriver::setPsu(double voltage){
qDebug() << "New voltage =" << voltage;
currentPsuVoltage = voltage;
//if(deviceMode > 6) qFatal("setPsu is not configured for mode 7!!!");
double vinp = voltage/11;
double vinp = (voltage - psu_offset)/11;
double vinn = 0;
//double vref = 1.65;
double gainPsu = 1;

View File

@ -70,6 +70,7 @@ public:
void saveState(int *_out_deviceMode, double *_out_scopeGain, double *_out_currentPsuVoltage, int *_out_digitalPinState);
virtual void usbSendControl(uint8_t RequestType, uint8_t Request, uint16_t Value, uint16_t Index, uint16_t Length, unsigned char *LDATA) = 0;
virtual void manualFirmwareRecovery(void) = 0;
double psu_offset = 0;
protected:
//State Vars
unsigned char fGenTriple=0;

View File

@ -22,6 +22,7 @@ class isoDriver : public QLabel
Q_OBJECT
public:
explicit isoDriver(QWidget *parent = 0);
void autoGain(void);
//Generic Vars
isoBuffer *internalBuffer375_CH1, *internalBuffer375_CH2, *internalBuffer750;
isoBuffer_file *internalBufferFile = NULL;
@ -82,7 +83,6 @@ private:
void digitalConvert(short *shortPtr, QVector<double> *doublePtr);
void fileStreamConvert(float *floatPtr, QVector<double> *doublePtr);
bool properlyPaused();
void autoGain(void);
void udateCursors(void);
short reverseFrontEnd(double voltage);
int trigger(void);

View File

@ -1118,6 +1118,7 @@ void MainWindow::readSettingsFile(){
double calibrate_vref_ch2 = settings->value("CalibrateVrefCH2", 1.65).toDouble();
double calibrate_gain_ch1 = settings->value("CalibrateGainCH1", R4/(R3+R4)).toDouble();
double calibrate_gain_ch2 = settings->value("CalibrateGainCH2", R4/(R3+R4)).toDouble();
psu_voltage_calibration_offset = settings->value("CalibratePsu", 0).toDouble();
daq_num_to_average = settings->value("daq_defaultAverage", 1).toInt();
daq_max_file_size = settings->value("daq_defaultFileSize", 2048000000).toULongLong();
@ -1267,6 +1268,7 @@ void MainWindow::reinitUsbStage2(void){
connect(ui->controller_iso->driver, SIGNAL(signalFirmwareFlash(void)), ui->deviceConnected, SLOT(flashingFirmware(void)));
connect(ui->controller_iso->driver, SIGNAL(initialConnectComplete()), this, SLOT(resetUsbState()));
ui->controller_iso->driver->setGain(reinitScopeGain);
ui->controller_iso->driver->psu_offset = psu_voltage_calibration_offset;
readSettingsFile();
@ -2083,3 +2085,106 @@ void MainWindow::on_kickstartIsoButton_clicked()
{
ui->controller_iso->driver->kickstartIso();
}
void MainWindow::on_actionCalibrate_2_triggered()
{
qDebug() << "Calibrating PSU!";
//Abort if Scope is uncalibrated
if ((ui->controller_iso->ch1_ref == 1.65) && (ui->controller_iso->ch2_ref == 1.65) && (ui->controller_iso->frontendGain_CH1 == R4/(R3+R4)) && (ui->controller_iso->frontendGain_CH2 == R4/(R3+R4)))\
{
calibrationMessages->setStandardButtons(QMessageBox::Ok);
calibrationMessages->setText("You need to calibrate the oscilloscope before the power supply!");
calibrationMessages->exec();
return;
}
calibrationMessages->setStandardButtons(QMessageBox::Ok);
calibrationMessages->setText("Calibration requires me to control your power supply temporarily. \n\nTO PREVENT BLUE SMOKE DAMAGE, DISCONNECT ANY CIRCUIT ATTACHED TO YOUR POWER SUPPLY NOW.");
calibrationMessages->exec();
qDebug() << "Beginning PSU calibration!";
//Must be mode 0
//Must be DC coupled
//CH1 must be shorted to PSU out
//Gain must be 1x
qDebug() << "Changing workspace...";
ui->psuSlider->setValue(0);
ui->busSifferGroup_CH1->setChecked(false);
ui->busSnifferGroup_CH2->setChecked(false);
ui->multimeterGroup->setChecked(false);
ui->triggerGroup->setChecked(false);
ui->scopeGroup_CH1->setChecked(true);
ui->scopeGroup_CH2->setChecked(false);
ui->pausedLabeL_CH1->setChecked(false);
ui->pausedLabel_CH2->setChecked(false);
ui->doubleSampleLabel->setChecked(false);
ui->acCoupledLabel_CH1->setChecked(false);
ui->acCoupledLabel_CH2->setChecked(false);
ui->pause_LA->setChecked(false);
ui->multimeterPauseCheckBox->setChecked(false);
ui->controller_iso->setAutoGain(false);
ui->controller_iso->setGain(4);
//Remove the offset before setting it again; don't want them to stack!
ui->controller_iso->driver->psu_offset = 0;
qDebug() << "PSU Calibration routine beginning!";
calibrationMessages->setStandardButtons(QMessageBox::Ok);
calibrationMessages->setText("Please connect your Labrador's Oscilloscope CH1 (DC) pin to the Power Supply Output (positive) then press OK to continue.");
calibrationMessages->exec();
ui->controller_iso->driver->setPsu(5);
ui->controller_iso->clearBuffers(1,1,1);
QTimer::singleShot(1800, this, SLOT(calibrate_psu_stage2()));
}
void MainWindow::calibrate_psu_stage2()
{
PSU5 = ui->controller_iso->meanVoltageLast(1, 1, 128);
qDebug() << "PSU5 =" << PSU5;
if((PSU5 > 6) | (PSU5 < 4) ){
ui->psuSlider->setValue(1);
ui->psuSlider->setValue(0);
ui->controller_iso->clearBuffers(1,1,1);
ui->controller_iso->setAutoGain(true);
ui->controller_iso->autoGain();
calibrationMessages->setText("Calibration has been abandoned due to out-of-range values. The oscilloscope should show approximately 5V. Please check all wires on your Labrador board and try again.");
calibrationMessages->exec();
return;
}
ui->controller_iso->setGain(1);
ui->controller_iso->driver->setPsu(10);
ui->controller_iso->clearBuffers(1,1,1);
QTimer::singleShot(1800, this, SLOT(calibrate_psu_stage3()));
}
void MainWindow::calibrate_psu_stage3()
{
PSU10 = ui->controller_iso->meanVoltageLast(1, 1, 128);
qDebug() << "PSU10 =" << PSU10;
ui->psuSlider->setValue(1);
ui->psuSlider->setValue(0);
ui->controller_iso->clearBuffers(1,1,1);
ui->controller_iso->setAutoGain(true);
ui->controller_iso->autoGain();
if((PSU10 > 11) | (PSU10 < 9) ){
calibrationMessages->setText("Calibration has been abandoned due to out-of-range values. The oscilloscope should show approximately 10V. Please check all wires on your Labrador board and try again.");
calibrationMessages->exec();
return;
}
psu_voltage_calibration_offset = ((PSU5 - 5) + (PSU10 - 10)) / 2.0;
settings->setValue("CalibratePsu", psu_voltage_calibration_offset);
ui->controller_iso->driver->psu_offset = psu_voltage_calibration_offset;
calibrationMessages->setStandardButtons(QMessageBox::Ok);
calibrationMessages->setText("PSU calibration complete.");
calibrationMessages->exec();
qDebug() << "PSU Calibration complete! Offset =" << psu_voltage_calibration_offset;
}

View File

@ -184,6 +184,12 @@ private slots:
void on_kickstartIsoButton_clicked();
void on_actionCalibrate_2_triggered();
void calibrate_psu_stage2();
void calibrate_psu_stage3();
private:
//Generic Vars
Ui::MainWindow *ui;
@ -194,6 +200,8 @@ private:
QFile *output375_CH1, *output375_CH2, *output750;
unsigned char caibrateStage;
QMessageBox *calibrationMessages;
double PSU5, PSU10;
double psu_voltage_calibration_offset;
int reinitdeviceMode;
double reinitScopeGain;

View File

@ -1341,7 +1341,7 @@
<x>0</x>
<y>0</y>
<width>1440</width>
<height>22</height>
<height>31</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -1445,8 +1445,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>181</width>
<height>125</height>
<width>183</width>
<height>151</height>
</rect>
</property>
<property name="title">
@ -1572,6 +1572,7 @@
<string>Power Supply</string>
</property>
<addaction name="actionAuto_Lock"/>
<addaction name="actionCalibrate_2"/>
</widget>
<widget class="QMenu" name="menuConnection_Type">
<property name="title">
@ -2267,6 +2268,11 @@
<string>Quit</string>
</property>
</action>
<action name="actionCalibrate_2">
<property name="text">
<string>Calibrate</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>