pid fixes
authorErik Andresen <erik@vontaene.de>
Sat, 16 Jul 2016 13:10:20 +0000 (15:10 +0200)
committerErik Andresen <erik@vontaene.de>
Sat, 16 Jul 2016 13:10:20 +0000 (15:10 +0200)
avr/motor_ctrl/main.c
avr/motor_ctrl/main.hex
scripts/pid_manual.py [new file with mode: 0755]

index 5c6a667..66a7c4a 100644 (file)
 #define TWI_RESET      TWCR &= ~((1 << TWSTO) | (1 << TWEN)); TWI_ACK
 #define TWI_NAK                TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE)
 
-#define KP 0.025
-#define KI 2.3
+#define KP 0.039
+#define KI 0.08
 #define KD 0.0
 #define PID_T 0.01
 // wheel diameter=12cm, encoder=48cpr, gear ratio=1:34, real wheel diameter: 0.12454m
@@ -172,7 +172,7 @@ ISR(TWI_vect)
        static ufloat_t tmp_angle;
 
        switch (TWSR & 0xF8)
-       {  
+       {
                case 0x60: // start write
                        TWI_ACK;
                        ireg = 0;
@@ -871,7 +871,9 @@ static void update_pid(void) {
                        motor1 = KP*e + KI*PID_T*esum1 + KD/PID_T*(e - eold1);
                        eold1 = e;
 
-                        if (motor1 > 255) motor1 = 255;
+                       if (motor1 > 0 && speed1_wish < 0) motor1=0;
+                       else if (motor1 < 0 && speed1_wish > 0) motor1=0;
+                       else if (motor1 > 255) motor1 = 255;
                        else if (motor1 < -255) motor1 = -255;
                }
        }
@@ -886,7 +888,9 @@ static void update_pid(void) {
                        motor2 = KP*e + KI*PID_T*esum2 + KD/PID_T*(e - eold2);
                        eold2 = e;
 
-                        if (motor2 > 255) motor2 = 255;
+                       if (motor2 > 0 && speed2_wish < 0) motor2=0;
+                       else if (motor2 < 0 && speed2_wish > 0) motor2=0;
+                       else if (motor2 > 255) motor2 = 255;
                        else if (motor2 < -255) motor2 = -255;
                }
        }
@@ -901,7 +905,9 @@ static void update_pid(void) {
                        motor3 = KP*e + KI*PID_T*esum3 + KD/PID_T*(e - eold3);
                        eold3 = e;
 
-                        if (motor3 > 255) motor3 = 255;
+                       if (motor3 > 0 && speed3_wish < 0) motor3=0;
+                       else if (motor3 < 0 && speed3_wish > 0) motor3=0;
+                       else if (motor3 > 255) motor3 = 255;
                        else if (motor3 < -255) motor3 = -255;
                }
        }
@@ -916,7 +922,9 @@ static void update_pid(void) {
                        motor4 = KP*e + KI*PID_T*esum4 + KD/PID_T*(e - eold4);
                        eold4 = e;
 
-                        if (motor4 > 255) motor4 = 255;
+                       if (motor4 > 0 && speed4_wish < 0) motor4=0;
+                       else if (motor4 < 0 && speed4_wish > 0) motor4=0;
+                       else if (motor4 > 255) motor4 = 255;
                        else if (motor4 < -255) motor4 = -255;
                }
        }
index 88dbf87..89381be 100644 (file)
 :1001A000A9020C50B9918688083CA6AAAA2ABE00CA\r
 :1001B0000000803F45464765666700202B2D2E30A6\r
 :1001C00031323334353637383968000011241FBED8\r
-:1001D000CFE5D8E0DEBFCDBF10E0A0E6B0E0E6E7B7\r
-:1001E000F6E202C005900D92AA37B107D9F721E0D7\r
+:1001D000CFE5D8E0DEBFCDBF10E0A0E6B0E0EEE6B0\r
+:1001E000F7E202C005900D92AA37B107D9F721E0D6\r
 :1001F000AAE7B0E001C01D92A836B207E1F70E945D\r
-:1002000020060C9439130C9400001F920F920FB625\r
+:1002000020060C94B5130C9400001F920F920FB6A9\r
 :100210000F9211242F933F934F935F936F937F938C\r
 :100220008F939F93AF93BF93EF93FF9381B1887F99\r
 :10023000803881F040F4803609F01CC385EC86BF1D\r
@@ -74,7 +74,7 @@
 :100490008091A4009091A500A091A600B091A70022\r
 :1004A0006627782F892F9A2F622B6093A400709370\r
 :1004B000A5008093A6009093A70023E33BE542E8C4\r
-:1004C00055E40E94E80F0E94C80E7093D10060931B\r
+:1004C00055E40E9464100E94440F7093D100609321\r
 :1004D000D0007093CF006093CE0081E08093D7006E\r
 :1004E0008093D600B7C183B190E0A0E0B0E00EC029\r
 :1004F00023B18091A4009091A500A091A600B09195\r
@@ -91,7 +91,7 @@
 :1005A000D30058C183B18093AB0003C083B1809363\r
 :1005B000AA0081E08093F2004DC18091E90090E0B3\r
 :1005C000FC013297E13AF10508F04BC1E65DFF4FBF\r
-:1005D0000C94B4108AB59BB53CC188B599B539C1A6\r
+:1005D0000C9430118AB59BB53CC188B599B539C129\r
 :1005E00083B537C18CB735C113B834C18091DE00F3\r
 :1005F0009091DF000EC08091DC009091DD0009C079\r
 :100600008091DA009091DB0004C08091D800909135\r
 :100AA0000F900FBE0F901F9018959C018AB188611E\r
 :100AB0008AB9579A80B5866080BD40E050E084E0F6\r
 :100AC000220F331F441F551F8A95D1F760E079E04C\r
-:100AD0008DE390E00E949510DA01C9010197A10908\r
+:100AD0008DE390E00E941111DA01C9010197A1098B\r
 :100AE000B109892F9A2FAB2FBB27A7FDBA9580BDDF\r
 :100AF000215029B987EF90E09093F4008093F300A0\r
 :100B00009093F6008093F50008955D9BFECFFC0165\r
 :100B3000DF91CF910895CF93DF93EC01CE01219601\r
 :100B4000FC012081222319F00E948505F7CFDF9157\r
 :100B5000CF9108955F9BFECF8CB190E008950C94E7\r
-:100B6000AA056FEA75E08BE895E00C94E710CF9347\r
+:100B6000AA056FEA75E08BE895E00C946311CF93CA\r
 :100B7000DF93FC01E253FF4FA081B181EC01C4532C\r
 :100B8000DF4F28813981A217B307A1F05D9B12C006\r
 :100B90002C912CB920813181AC0145535F4F241732\r
 :100C70000E9455050E94B10580E582B986B78B7E3A\r
 :100C800086BF85EC86BF81EA8FBD89E08EBD1BBC27\r
 :100C90001ABC19BC18BC89E685BD13BC83BF1CBE39\r
-:100CA00080E790E00E94641185B78F7885BF84E06B\r
+:100CA00080E790E00E94E01185B78F7885BF84E0EF\r
 :100CB00089BF789494E6292E312C8091E9008F3FEA\r
 :100CC00041F48091E800853A21F4F894E0E0F8E1FD\r
 :100CD00009958091F200882309F4E6C0F894809089\r
 :100CE000EA009090EB00A090EC00B090ED006091D5\r
 :100CF000EE007091EF008091F0009091F100109261\r
-:100D0000F20078942BED3FE049E450E40E94E80FB4\r
-:100D100027EB3BE04DEB5EE30E94E80F20E030E084\r
-:100D200040E05FE30E94E80FA50194010E94F50DE9\r
-:100D30006B017C01A5019401C501B4010E94F50D70\r
-:100D4000A70196010E94F40D23E33BE542E855E438\r
-:100D50000E94E80F4B015C0123E33BE542E855E4C8\r
-:100D6000C701B6010E94E80F6B017C018091AA00C7\r
+:100D0000F20078942BED3FE049E450E40E94641037\r
+:100D100027EB3BE04DEB5EE30E94641020E030E007\r
+:100D200040E05FE30E946410A50194010E94710EEF\r
+:100D30006B017C01A5019401C501B4010E94710EF3\r
+:100D4000A70196010E94700E23E33BE542E855E4BB\r
+:100D50000E9464104B015C0123E33BE542E855E44B\r
+:100D6000C701B6010E9464106B017C018091AA004A\r
 :100D70008823B9F18091AA009101281B3109B9019A\r
-:100D8000882777FD8095982F0E94FB0E9B01AC0170\r
-:100D9000C501B4010E94E80F20E030E048EC52E4C5\r
-:100DA0000E94600E0E94C80E7093D1006093D00024\r
+:100D8000882777FD8095982F0E94770F9B01AC01F3\r
+:100D9000C501B4010E94641020E030E048EC52E448\r
+:100DA0000E94DC0E0E94440F7093D1006093D0002B\r
 :100DB0008091AA00A101481B5109BA01882777FD3B\r
-:100DC0008095982F0E94FB0E9B01AC01C701B601D4\r
-:100DD0000E94E80F20E030E048EC52E40E94600EF0\r
-:100DE0000AC0C501B4010E94C80E7093D10060937F\r
-:100DF000D000C701B6010E94C80E7093CB0060936B\r
+:100DC0008095982F0E94770F9B01AC01C701B60157\r
+:100DD0000E94641020E030E048EC52E40E94DC0EF7\r
+:100DE0000AC0C501B4010E94440F7093D100609302\r
+:100DF000D000C701B6010E94440F7093CB006093EE\r
 :100E0000CA008091AB008823B1F18091AB00F10161\r
 :100E1000E81BF109BF01882777FD8095982F0E9474\r
-:100E2000FB0E9B01AC01C501B4010E94E80F20E05C\r
-:100E300030E048EC52E40E94600E0E94C80E7093AD\r
+:100E2000770F9B01AC01C501B4010E94641020E062\r
+:100E300030E048EC52E40E94DC0E0E94440F7093B4\r
 :100E4000CF006093CE008091AB00B101681B7109A7\r
-:100E5000882777FD8095982F0E94FB0E9B01AC019F\r
-:100E6000C701B6010E94E80F20E030E048EC52E4F0\r
-:100E70000E94600E0AC0C501B4010E94C80E7093A2\r
-:100E8000CF006093CE00C701B6010E94C80E7093D8\r
+:100E5000882777FD8095982F0E94770F9B01AC0122\r
+:100E6000C701B6010E94641020E030E048EC52E473\r
+:100E70000E94DC0E0AC0C501B4010E94440F7093A9\r
+:100E8000CF006093CE00C701B6010E94440F70935B\r
 :100E9000CD006093CC00F1E0F093D700F093D60042\r
 :100EA000F093D500F093D4008091C9008C3908F4F8\r
-:100EB00046C51092C900F8942091DE003091DF0001\r
+:100EB000C2C51092C900F8942091DE003091DF0085\r
 :100EC0003A8329834091DC005091DD005C834B83A1\r
 :100ED0008091DA009091DB009E838D83E091D800B1\r
 :100EE000F091D900F887EF837894809198009091E1\r
 :100F00008A01081B190B8091940090919500ED8047\r
 :100F1000FE80E81AF90A80919200909193006F0187\r
 :100F2000C81AD90AB501882777FD8095982F0E94A5\r
-:100F3000FB0E2AE037ED43E25CE30E94600E0E9464\r
-:100F4000C80E69877A878B879C87B801882777FDC9\r
-:100F50008095982F0E94FB0E2AE037ED43E25CE378\r
-:100F60000E94600E0E94C80E6D877E878F87988BC7\r
-:100F7000B701882777FD8095982F0E94FB0E2AE005\r
-:100F800037ED43E25CE30E94600E0E94C80E698B5D\r
+:100F3000770F2AE037ED43E25CE30E94DC0E0E946B\r
+:100F4000440F69877A878B879C87B801882777FD4C\r
+:100F50008095982F0E94770F2AE037ED43E25CE3FB\r
+:100F60000E94DC0E0E94440F6D877E878F87988BCE\r
+:100F7000B701882777FD8095982F0E94770F2AE088\r
+:100F800037ED43E25CE30E94DC0E0E94440F698B64\r
 :100F90007A8B8B8B9C8BB601882777FD8095982F59\r
-:100FA0000E94FB0E2AE037ED43E25CE30E94600EF4\r
-:100FB0000E94C80E6D8B7E8B8F8B988FB501600F52\r
-:100FC000711F882777FD8095982F0E94FB0E23E3E1\r
-:100FD0003BE542E056E40E94600E4B015C01B70124\r
-:100FE0006C0D7D1D882777FD8095982F0E94FB0E44\r
-:100FF00023E33BE542E056E40E94600E2B013C01F6\r
+:100FA0000E94770F2AE037ED43E25CE30E94DC0EFB\r
+:100FB0000E94440F6D8B7E8B8F8B988FB501600FD5\r
+:100FC000711F882777FD8095982F0E94770F23E364\r
+:100FD0003BE542E056E40E94DC0E4B015C01B701A8\r
+:100FE0006C0D7D1D882777FD8095982F0E94770FC7\r
+:100FF00023E33BE542E056E40E94DC0E2B013C017A\r
 :10100000C090B500D090B600E090B700F090B80066\r
-:10101000A50194010E94F40D27EB3BE04DEB5EE34C\r
-:101020000E94600E9B01AC01C701B6010E94F50D44\r
-:101030006B017C012BED3FE049EC50E40E94E40F92\r
+:10101000A50194010E94700E27EB3BE04DEB5EE3CF\r
+:101020000E94DC0E9B01AC01C701B6010E94710E4B\r
+:101030006B017C012BED3FE049EC50E40E94601015\r
 :1010400018164CF42BED3FE049EC50E4C701B60113\r
-:101050000E94F40D12C02BED3FE049EC50ECC701AB\r
-:10106000B6010E94590E87FF0AC02BED3FE049EC04\r
-:1010700050E4C701B6010E94F50D6B017C01A3018C\r
-:101080009201C501B4010E94F50D20E030E040E07E\r
-:101090005FE30E94E80F4B015C014090BD0050905F\r
+:101050000E94700E12C02BED3FE049EC50ECC7012E\r
+:10106000B6010E94D50E87FF0AC02BED3FE049EC88\r
+:1010700050E4C701B6010E94710E6B017C01A3010F\r
+:101080009201C501B4010E94710E20E030E040E001\r
+:101090005FE30E9464104B015C014090BD005090E2\r
 :1010A000BE006090BF007090C000C701B6010E94F2\r
-:1010B0005D0EA50194010E94E80F9B01AC01C301E4\r
-:1010C000B2010E94F50D698F7A8F8B8F9C8F4090B3\r
+:1010B000D90EA50194010E9464109B01AC01C301EB\r
+:1010C000B2010E94710E698F7A8F8B8F9C8F409036\r
 :1010D000B9005090BA006090BB007090BC00C7018E\r
-:1010E000B6010E944B10A50194010E94E80F9B01DC\r
-:1010F000AC01C301B2010E94F50D2B013C010D852D\r
+:1010E000B6010E94C710A50194010E9464109B01E3\r
+:1010F000AC01C301B2010E94710E2B013C010D85B0\r
 :101100001E8529853A85020F131F17FF02C00F5F46\r
 :101110001F4F159507954D895E8989899A89480FD2\r
 :10112000591F57FF02C04F5F5F4FFA01F595E795D2\r
 :10113000FE8FED8FBF01600F711F882777FD8095AF\r
-:10114000982F0E94FB0E23E33BE542E056E40E9409\r
-:10115000600E4B015C016D8D7E8D601B710B8827CD\r
-:1011600077FD8095982F0E94FB0E29E935E347E92A\r
-:1011700055E40E94600EF894C092B500D092B6007B\r
+:10114000982F0E94770F23E33BE542E056E40E948C\r
+:10115000DC0E4B015C016D8D7E8D601B710B882751\r
+:1011600077FD8095982F0E94770F29E935E347E9AD\r
+:1011700055E40E94DC0EF894C092B500D092B600FF\r
 :10118000E092B700F092B800298D3A8D4B8D5C8DBE\r
 :101190002093BD003093BE004093BF005093C00029\r
 :1011A0004092B9005092BA006092BB007092BC00AD\r
 :10120000789489819A819093990080939800EB81DA\r
 :10121000FC81F0939700E09396002D813E813093FE\r
 :101220009500209394004F815885509393004093EC\r
-:1012300092008091D700813009F094C08091D00055\r
+:1012300092008091D700813009F0B3C08091D00036\r
 :101240009091D100892B89F41092E7001092E6006A\r
 :10125000109291001092900010928C0010928D00CC\r
-:1012600010928E0010928F007DC00091D0001091DE\r
+:1012600010928E0010928F009CC00091D0001091BF\r
 :10127000D1008091C7009091C800081B190BB801DC\r
 :10128000882777FD8095982FC0908C00D0908D0096\r
 :10129000E0908E00F0908F00C60ED71EE81EF91E5B\r
 :1012A000C0928C00D0928D00E0928E00F0928F0060\r
-:1012B0000E94FB0E2DEC3CEC4CEC5CE30E94E80F32\r
-:1012C0004B015C01C701B6010E94FB0E2EE73AE616\r
-:1012D0004CEB5CE30E94E80F9B01AC01C501B4013B\r
-:1012E0000E94F50D6B017C0180919000909191001E\r
+:1012B0000E94770F27E73EEB4FE15DE30E94641049\r
+:1012C0004B015C01C701B6010E94770F27E137EBA4\r
+:1012D00041E55AE30E9464109B01AC01C501B401D1\r
+:1012E0000E94710E6B017C018091900090919100A1\r
 :1012F000B801681B790B882777FD8095982F0E948D\r
-:10130000FB0E20E030E0A9010E94E80F9B01AC0138\r
-:10131000C701B6010E94F50D0E94C80E7093E70048\r
+:10130000770F20E030E0A9010E9464109B01AC013E\r
+:10131000C701B6010E94710E0E94440F7093E7004E\r
 :101320006093E60010939100009390008091E60096\r
-:101330009091E7008F3F910541F03CF08FEF90E0F6\r
-:101340009093E7008093E6000DC08091E6009091B5\r
-:10135000E70081309F4F34F421E03FEF3093E70006\r
-:101360002093E6008091D600813009F094C08091EE\r
-:10137000CE009091CF00892B89F41092E500109255\r
-:10138000E40010928B0010928A0010928600109256\r
-:10139000870010928800109289007DC00091CE00D5\r
-:1013A0001091CF008091C5009091C600081B190BC9\r
-:1013B000B801882777FD8095982FC0908600D0903F\r
-:1013C0008700E0908800F0908900C60ED71EE81EC6\r
-:1013D000F91EC0928600D0928700E0928800F092B9\r
-:1013E00089000E94FB0E2DEC3CEC4CEC5CE30E946F\r
-:1013F000E80F4B015C01C701B6010E94FB0E2EE70E\r
-:101400003AE64CEB5CE30E94E80F9B01AC01C5019E\r
-:10141000B4010E94F50D6B017C0180918A009091CE\r
-:101420008B00B801681B790B882777FD8095982F72\r
-:101430000E94FB0E20E030E0A9010E94E80F9B0112\r
-:10144000AC01C701B6010E94F50D0E94C80E709351\r
-:10145000E5006093E40010938B0000938A00809174\r
-:10146000E4009091E5008F3F910541F03CF04FEF93\r
-:1014700050E05093E5004093E4000DC08091E400FB\r
-:101480009091E50081309F4F34F481E09FEF90937D\r
-:10149000E5008093E4008091D500813009F094C08C\r
-:1014A0008091CC009091CD00892B89F41092E300BB\r
-:1014B0001092E20010928500109284001092800039\r
-:1014C0001092810010928200109283007DC00091E2\r
-:1014D000CC001091CD008091C3009091C400081BF6\r
-:1014E000190BB801882777FD8095982FC090800050\r
-:1014F000D0908100E0908200F0908300C60ED71E4D\r
-:10150000E81EF91EC0928000D0928100E092820015\r
-:10151000F09283000E94FB0E2DEC3CEC4CEC5CE363\r
-:101520000E94E80F4B015C01C701B6010E94FB0E4F\r
-:101530002EE73AE64CEB5CE30E94E80F9B01AC011E\r
-:10154000C501B4010E94F50D6B017C0180918400FE\r
-:1015500090918500B801681B790B882777FD8095ED\r
-:10156000982F0E94FB0E20E030E0A9010E94E80FB6\r
-:101570009B01AC01C701B6010E94F50D0E94C80E87\r
-:101580007093E3006093E200109385000093840061\r
-:101590008091E2009091E3008F3F910541F03CF093\r
-:1015A000EFEFF0E0F093E300E093E2000DC08091F4\r
-:1015B000E2009091E30081309F4F34F421E03FEF4F\r
-:1015C0003093E3002093E2008091D400813009F051\r
-:1015D00094C08091CA009091CB00892B89F410921D\r
-:1015E000E1001092E00010927F0010927E001092B5\r
-:1015F0007A0010927B0010927C0010927D007DC0DA\r
-:101600000091CA001091CB008091C1009091C2005E\r
-:10161000081B190BB801882777FD8095982FC0907B\r
-:101620007A00D0907B00E0907C00F0907D00C60EA8\r
-:10163000D71EE81EF91EC0927A00D0927B00E0927D\r
-:101640007C00F0927D000E94FB0E2DEC3CEC4CECFB\r
-:101650005CE30E94E80F4B015C01C701B6010E94E8\r
-:10166000FB0E2EE73AE64CEB5CE30E94E80F9B0191\r
-:10167000AC01C501B4010E94F50D6B017C018091A4\r
-:101680007E0090917F00B801681B790B882777FD59\r
-:101690008095982F0E94FB0E20E030E0A9010E9467\r
-:1016A000E80F9B01AC01C701B6010E94F50D0E9435\r
-:1016B000C80E7093E1006093E00010937F000093E8\r
-:1016C0007E008091E0009091E1008F3F910541F014\r
-:1016D0003CF04FEF50E05093E1004093E0000DC02C\r
-:1016E0008091E0009091E10081309F4F34F481E0DF\r
-:1016F0009FEF9093E1008093E00080B326B3807465\r
-:1017000090E0A3E095958795AA95E1F72770282B9F\r
-:1017100020952F702093A9008091E6009091E7001A\r
-:10172000209166003091670028173907C9F1809130\r
-:10173000E6009091E700892B19F485B3837F1CC0E4\r
-:1017400080916900811107C08091E6009091E700C7\r
-:101750001816190654F080916900882351F0809181\r
-:10176000E6009091E70097FF04C085B3877F84600F\r
-:1017700003C085B38B7F886085BB8091E600909124\r
-:10178000E70090936700809366008091E600909157\r
-:10179000E70097FF03C09195819591099BBD8ABD94\r
-:1017A0008091E4009091E500209164003091650003\r
-:1017B00028173907C9F18091E4009091E500892B41\r
-:1017C00019F485B38F7C1CC080916800811107C01B\r
-:1017D0008091E4009091E5001816190654F080916C\r
-:1017E0006800882351F08091E4009091E50097FF14\r
-:1017F00004C085B38F7D806103C085B38F7E806216\r
-:1018000085BB8091E4009091E50090936500809302\r
-:1018100064008091E4009091E50097FF03C09195EA\r
-:101820008195910999BD88BD8091E2009091E30076\r
-:10183000209162003091630028173907C1F180912F\r
-:10184000E2009091E300892B19F485B38F731CC0DB\r
-:101850008091D300811107C08091E2009091E30054\r
-:101860001816190654F08091D300882351F0809106\r
-:10187000E2009091E30097FF04C085B38F77806406\r
-:1018800003C085B38F7B806885BB8091E200909117\r
-:10189000E30090936300809362008091E200909156\r
-:1018A000E30097FF03C091958195910983BD8091D5\r
-:1018B000E0009091E10020916000309161002817D4\r
-:1018C0003907C1F18091E0009091E100892B19F472\r
-:1018D00082B3837F1CC08091D200811107C08091A8\r
-:1018E000E0009091E1001816190654F08091D200A2\r
-:1018F000882351F08091E0009091E10097FF04C0AF\r
-:1019000082B3877F846003C082B38B7F886082BB91\r
-:101910008091E0009091E1009093610080936000DD\r
-:101920008091E0009091E10097FF03C0919581952F\r
-:1019300091098CBF8091AC008F5F8093AC0085B71C\r
-:10194000806885BF889585B78F7785BFB6C96F9248\r
-:101950007F929F92AF92BF92CF92DF92EF92FF92CF\r
-:101960000F931F93CF93DF93CDB7DEB72C970FB6AE\r
-:10197000F894DEBF0FBECDBF8C017B013A01FC01A4\r
-:1019800017821682838181FF19C1CE0101965C0105\r
-:10199000F801D380F701D3FC2591D3FE21917F017B\r
-:1019A000222309F407C1253249F4D3FC2591D3FE43\r
-:1019B00021917F01253211F0912C1BC0B801822F9B\r
-:1019C00090E00E94321163013601E2CF222309F434\r
-:1019D000F1C0622F70E08BEB91E02C870E94DC104D\r
-:1019E0002C85892B49F0F701D3FC2591D3FE219159\r
-:1019F0007F0197FEEBCF0CC0233221F4F92DF0616B\r
-:101A00009F2EF1CF2C3639F4292D2068922EEBCF62\r
-:101A1000222309F4CFC0622F70E084EB91E02C8781\r
-:101A20000E94DC102C85892B41F06301F4E0CF0E7D\r
-:101A3000D11CB8018FE390E012C0233641F0233768\r
-:101A400089F0233521F5F92DF1609F2E0BC063013C\r
-:101A500022E0C20ED11CB801F301808191810E9465\r
-:101A60003211B2CF630122E0C20ED11CF3016080BB\r
-:101A70007180F30190FC859190FE81913F01882354\r
-:101A800009F4A2CFB80190E00E943211F2CF2436BF\r
-:101A900011F0293639F5630197FE09C0F4E0CF0E45\r
-:101AA000D11CF30160817181828193810AC0F2E0CF\r
-:101AB000CF0ED11CF30160817181882777FD80955D\r
-:101AC000982FF92DFF7E9F2E97FF09C09095809546\r
-:101AD000709561957F4F8F4F9F4FF0649F2E2AE046\r
-:101AE00030E038C02037A1F040F42835D1F02F364F\r
-:101AF00009F060C028E030E019C0253719F0283718\r
-:101B000051F058C0292D2F7E922E2AE030E00EC0D1\r
-:101B1000892D8061982E992D9462992E20E130E0D4\r
-:101B200005C0E92DE4609E2E20E132E0630197FEBE\r
-:101B300009C0F4E0CF0ED11CF30160817181828174\r
-:101B4000938108C0F2E0CF0ED11CF3016081718156\r
-:101B500080E090E0A5010E949111782E7A1896FEFF\r
-:101B600005C0B8018DE290E00E94321194FE16C0CB\r
-:101B7000FE01E70DF11D8081803381F0B80180E323\r
-:101B800090E00E94321192FE09C0292D2072822F0E\r
-:101B900090E0B801885A9F4F0E9432117A94F50163\r
-:101BA000E70DF11D8081B80190E00E9432117110A3\r
-:101BB000F5CF0ACFF8018681978102C08FEF9FEFA2\r
-:101BC0002C960FB6F894DEBF0FBECDBFDF91CF913C\r
-:101BD0001F910F91FF90EF90DF90CF90BF90AF904B\r
-:101BE0009F907F906F9008955058BB27AA270ED0E2\r
-:101BF000A0C169D130F06ED120F031F49F3F11F4D3\r
-:101C00001EF45EC10EF4E095E7FB54C1E92FB3D199\r
-:101C100080F3BA17620773078407950718F071F409\r
-:101C20009EF5CBC10EF4E0950B2EBA2FA02D0B0123\r
-:101C3000B90190010C01CA01A0011124FF27591B11\r
-:101C400099F0593F50F4503E68F11A16F040A22F17\r
-:101C5000232F342F4427585FF3CF46953795279588\r
-:101C6000A795F0405395C9F77EF41F16BA0B620B87\r
-:101C7000730B840BBAF09150A1F0FF0FBB1F661FCE\r
-:101C8000771F881FC2F70EC0BA0F621F731F841F11\r
-:101C900048F4879577956795B795F7959E3F08F037\r
-:101CA000B3CF9395880F08F09927EE0F97958795F6\r
-:101CB0000895DCD008F481E0089514D1E3954AC179\r
-:101CC0000CD037C107D140F0FED030F021F45F3F97\r
-:101CD00019F0F0C0511172C1F3C04DD198F399239E\r
-:101CE000C9F35523B1F3951B550BBB27AA276217E0\r
-:101CF0007307840738F09F5F5F4F220F331F441F25\r
-:101D0000AA1FA9F333D00E2E3AF0E0E830D091505C\r
-:101D10005040E695001CCAF729D0FE2F27D0660F49\r
-:101D2000771F881FBB1F261737074807AB07B0E888\r
-:101D300009F0BB0B802DBF01FF2793585F4F2AF09E\r
-:101D40009E3F510568F0B6C039C15F3FECF3983E45\r
-:101D5000DCF3869577956795B795F7959F5FC9F7FB\r
-:101D6000880F911D9695879597F90895E1E0660F84\r
-:101D7000771F881FBB1F621773078407BA0720F0FD\r
-:101D8000621B730B840BBA0BEE1F88F7E095089566\r
-:101D900004D06894B11112C10895F5D088F09F570E\r
-:101DA00090F0B92F9927B751A0F0D1F0660F771FA7\r
-:101DB000881F991F1AF0BA95C9F712C0B13081F087\r
-:101DC000FCD0B1E00895F9C0672F782F8827B85F5D\r
-:101DD00039F0B93FCCF3869577956795B395D9F7E8\r
-:101DE0003EF490958095709561957F4F8F4F9F4FF2\r
-:101DF0000895E89409C097FB3EF4909580957095FE\r
-:101E000061957F4F8F4F9F4F9923A9F0F92F96E946\r
-:101E1000BB279395F695879577956795B795F111BB\r
-:101E2000F8CFFAF4BB0F11F460FF1BC06F5F7F4F58\r
-:101E30008F4F9F4F16C0882311F096E911C077236A\r
-:101E400021F09EE8872F762F05C0662371F096E873\r
-:101E5000862F70E060E02AF09A95660F771F881F42\r
-:101E6000DAF7880F9695879597F90895990F0008E6\r
-:101E7000550FAA0BE0E8FEEF16161706E807F9075C\r
-:101E8000C0F012161306E407F50798F0621B730BF7\r
-:101E9000840B950B39F40A2661F0232B242B252B78\r
-:101EA00021F408950A2609F4A140A6958FEF811D1B\r
-:101EB000811D089597F99F6780E870E060E00895BC\r
-:101EC0009FEF80EC089500240A9416161706180652\r
-:101ED0000906089500240A9412161306140605062E\r
-:101EE0000895EECF50D0E8F3E894E0E0BB279F5789\r
-:101EF000F0F02AED3FE049EC06C0EE0FBB0F661F85\r
-:101F0000771F881F28F0B23A62077307840728F00A\r
-:101F1000B25A620B730B840BE3959A9572F7803873\r
-:101F200030F49A95BB0F661F771F881FD2F7904831\r
-:101F3000BAC0092E0394000C11F4882352F0BB0F91\r
-:101F400040F4BF2B11F460FF04C06F5F7F4F8F4FD1\r
-:101F50009F4F0895EF93E0FF06C0A2EA2AED3FE00D\r
-:101F600049EC5FEB53DEE5DF0F90039401FC9058E2\r
-:101F7000E6E9F1E0A4C057FD9058440F551F59F011\r
-:101F80005F3F71F04795880F97FB991F61F09F3F66\r
-:101F900079F087950895121613061406551FF2CF8F\r
-:101FA0004695F1DF08C0161617061806991FF1CFDF\r
-:101FB00086957105610508940895E894BB27662706\r
-:101FC0007727CB0197F9089551DF08F48FEF089533\r
-:101FD0000BD0AFCF78DF28F07DDF18F0952309F024\r
-:101FE00069CF6ECF1124EACFC6DFA0F3959FD1F35E\r
-:101FF000950F50E0551F629FF001729FBB27F00DB7\r
-:10200000B11D639FAA27F00DB11DAA1F649F66270B\r
-:10201000B00DA11D661F829F2227B00DA11D621F5A\r
-:10202000739FB00DA11D621F839FA00D611D221F14\r
-:10203000749F3327A00D611D231F849F600D211DF8\r
-:10204000822F762F6A2F11249F5750408AF0E1F09B\r
-:1020500088234AF0EE0FFF1FBB1F661F771F881FE4\r
-:1020600091505040A9F79E3F510570F023CFA6CF65\r
-:102070005F3FECF3983EDCF3869577956795B795CF\r
-:10208000F795E7959F5FC1F7FE2B880F911D9695F9\r
-:10209000879597F908959F9325DF0F9007FCEE5FD2\r
-:1020A00059CF9F3F31F0915020F4879577956795F0\r
-:1020B000B795880F911D9695879597F908959F93E9\r
-:1020C0008F937F936F93FF93EF939B01AC0180DF1E\r
-:1020D000EF91FF9105D02F913F914F915F9178CF74\r
-:1020E000DF93CF931F930F93FF92EF92DF927B01C9\r
-:1020F0008C01689405C0DA2EEF0176DFFE01E894CA\r
-:10210000A5912591359145915591AEF3EF017EDD75\r
-:10211000FE019701A801DA9479F7DF90EF90FF9024\r
-:102120000F911F91CF91DF910895052E97FB1EF41B\r
-:1021300000940E94AC1057FD07D00E94BA1007FC13\r
-:1021400003D04EF40C94AC105095409530952195E9\r
-:102150003F4F4F4F5F4F08959095809570956195D3\r
-:102160007F4F8F4F9F4F0895EE0FFF1F0590F49103\r
-:10217000E02D0994A1E21A2EAA1BBB1BFD010DC084\r
-:10218000AA1FBB1FEE1FFF1FA217B307E407F50727\r
-:1021900020F0A21BB30BE40BF50B661F771F881F03\r
-:1021A000991F1A9469F760957095809590959B0199\r
-:1021B000AC01BD01CF010895FC010590061621F088\r
-:1021C0000020D9F7C00108953197CF0108950F93EA\r
-:1021D0001F93CF93DF93EC018B01009731F46115CE\r
-:1021E000710519F480E090E038C06EE070E081E0A5\r
-:1021F00090E00E94EF11FC010097A1F380E8838337\r
-:102200000115110571F01387028781E8838380919E\r
-:102210005E0190915F01892B21F4F0935F01E093BF\r
-:102220005E012097C9F0D187C08783818260838354\r
-:102230008091600190916101892B71F4F0936101AB\r
-:10224000E09360018091620190916301892B21F4F8\r
-:10225000F0936301E0936201CF01DF91CF911F9171\r
-:102260000F9108950F931F93CF93DF93182F092F8A\r
-:10227000EB018B8181FD03C08FEF9FEF20C082FFB8\r
-:1022800010C04E815F812C813D81421753077CF441\r
-:10229000E881F9819F012F5F3F4F398328831083A5\r
-:1022A00006C0E885F985812F0995892B29F72E81AC\r
-:1022B0003F812F5F3F4F3F832E83812F902FDF91F0\r
-:1022C000CF911F910F9108950F931F93CF93DF9399\r
-:1022D000E0916001F0916101238121FF1BC0EC01BD\r
-:1022E00000E010E089916091600170916101DB0173\r
-:1022F0001896ED91FC911997882331F00995892B57\r
-:1023000089F30FEF1FEFEECF8AE00995892B11F4C7\r
-:10231000C80102C08FEF9FEFDF91CF911F910F9106\r
-:102320000895FA01AA27283051F1203181F1E8946B\r
-:102330006F936E7F6E5F7F4F8F4F9F4FAF4FB1E0B8\r
-:102340003ED0B4E03CD0670F781F891F9A1FA11DB3\r
-:10235000680F791F8A1F911DA11D6A0F711D811DB4\r
-:10236000911DA11D20D009F468943F912AE0269F79\r
-:1023700011243019305D3193DEF6CF010895462FD8\r
-:102380004770405D4193B3E00FD0C9F7F6CF462FB9\r
-:102390004F70405D4A3318F0495D31FD4052419322\r
-:1023A00002D0A9F7EACFB4E0A695979587957795DF\r
-:1023B0006795BA95C9F700976105710508959B0166\r
-:1023C000AC010A2E06945795479537952795BA95EF\r
-:1023D000C9F7620F731F841F951FA01D08950F93E7\r
-:1023E0001F93CF93DF93869F8001879F100D969F49\r
-:1023F000100D1124C8010E940B12EC01009729F066\r
-:10240000A80160E070E00E943213CE01DF91CF910D\r
-:102410001F910F910895CF93DF938230910510F4AF\r
-:1024200082E090E0E0916601F091670120E030E009\r
-:10243000A0E0B0E0309739F1408151814817590749\r
-:10244000B8F04817590771F482819381109729F0E9\r
-:1024500013969C938E9312972CC090936701809350\r
-:10246000660127C02115310531F04217530718F0D6\r
-:10247000A901DB0101C0EF019A01BD01DF0102806A\r
-:10248000F381E02DD7CF21153105F9F0281B390B49\r
-:102490002430310580F48A819B816115710521F01A\r
-:1024A000FB019383828304C090936701809366014C\r
-:1024B000FE01329644C0FE01E20FF31F8193919317\r
-:1024C00022503109398328833AC020916401309128\r
-:1024D0006501232B41F420916C0030916D00309305\r
-:1024E00065012093640120916A0030916B002115F1\r
-:1024F000310541F42DB73EB740916E0050916F0009\r
-:10250000241B350BE0916401F0916501E217F3079C\r
-:10251000A0F42E1B3F0B2817390778F0AC014E5F53\r
-:102520005F4F2417350748F04E0F5F1F509365012A\r
-:10253000409364018193919302C0E0E0F0E0CF0109\r
-:10254000DF91CF910895CF93DF93009709F487C06F\r
-:10255000FC01329713821282C0916601D09167010B\r
-:10256000209781F420813181280F391F80916401E7\r
-:10257000909165018217930779F5F0936501E093D7\r
-:1025800064016DC0DE0120E030E0AE17BF0750F4FB\r
-:1025900012964D915C9113979D014115510509F1DA\r
-:1025A000DA01F3CFB383A28340815181840F951F59\r
-:1025B0008A179B0771F48D919C911197840F951F39\r
-:1025C00002969183808312968D919C9113979383A9\r
-:1025D00082832115310529F4F0936701E0936601A8\r
-:1025E0003EC0D9011396FC93EE9312974D915D91E5\r
-:1025F000A40FB51FEA17FB0779F480819181840F3E\r
-:10260000951F0296D90111969C938E938281938196\r
-:1026100013969C938E931297E0E0F0E08A819B8161\r
-:10262000009719F0FE01EC01F9CFCE010296288146\r
-:102630003981820F931F2091640130916501281721\r
-:10264000390769F4309729F41092670110926601F6\r
-:1026500002C013821282D0936501C0936401DF919E\r
-:10266000CF910895DC0101C06D9341505040E0F7D7\r
-:062670000895F894FFCF6D\r
-:1026760000800080008000800101000068012000C9\r
-:0A2686000D0A53746172740D000018\r
+:101330009091E7001816190634F48091D00090912E\r
+:10134000D10097FD0DC08091E6009091E70097FFD6\r
+:101350000CC08091D0009091D100181619062CF481\r
+:101360001092E7001092E6001CC08091E600909178\r
+:10137000E7008F3F910541F03CF08FEF90E09093B4\r
+:10138000E7008093E6000DC08091E6009091E700B1\r
+:1013900081309F4F34F421E03FEF3093E7002093FA\r
+:1013A000E6008091D600813009F0B3C08091CE0074\r
+:1013B0009091CF00892B89F41092E5001092E400FF\r
+:1013C00010928B0010928A00109286001092870073\r
+:1013D00010928800109289009CC00091CE0010915C\r
+:1013E000CF008091C5009091C600081B190BB80171\r
+:1013F000882777FD8095982FC0908600D090870031\r
+:10140000E0908800F0908900C60ED71EE81EF91EF5\r
+:10141000C0928600D0928700E0928800F092890006\r
+:101420000E94770F27E73EEB4FE15DE30E946410D7\r
+:101430004B015C01C701B6010E94770F27E137EB32\r
+:1014400041E55AE30E9464109B01AC01C501B4015F\r
+:101450000E94710E6B017C0180918A0090918B003B\r
+:10146000B801681B790B882777FD8095982F0E941B\r
+:10147000770F20E030E0A9010E9464109B01AC01CD\r
+:10148000C701B6010E94710E0E94440F7093E500DF\r
+:101490006093E40010938B0000938A008091E40035\r
+:1014A0009091E5001816190634F48091CE009091C1\r
+:1014B000CF0097FD0DC08091E4009091E50097FF6B\r
+:1014C0000CC08091CE009091CF00181619062CF414\r
+:1014D0001092E5001092E4001CC08091E40090910D\r
+:1014E000E5008F3F910541F03CF04FEF50E0509305\r
+:1014F000E5004093E4000DC08091E4009091E50088\r
+:1015000081309F4F34F481E09FEF9093E50080930A\r
+:10151000E4008091D500813009F0B3C08091CC0007\r
+:101520009091CD00892B89F41092E3001092E20093\r
+:101530001092850010928400109280001092810019\r
+:1015400010928200109283009CC00091CC001091F8\r
+:10155000CD008091C3009091C400081B190BB80105\r
+:10156000882777FD8095982FC0908000D0908100CB\r
+:10157000E0908200F0908300C60ED71EE81EF91E90\r
+:10158000C0928000D0928100E0928200F0928300AD\r
+:101590000E94770F27E73EEB4FE15DE30E94641066\r
+:1015A0004B015C01C701B6010E94770F27E137EBC1\r
+:1015B00041E55AE30E9464109B01AC01C501B401EE\r
+:1015C0000E94710E6B017C018091840090918500D6\r
+:1015D000B801681B790B882777FD8095982F0E94AA\r
+:1015E000770F20E030E0A9010E9464109B01AC015C\r
+:1015F000C701B6010E94710E0E94440F7093E30070\r
+:101600006093E20010938500009384008091E200D3\r
+:101610009091E3001816190634F48091CC00909153\r
+:10162000CD0097FD0DC08091E2009091E30097FFFF\r
+:101630000CC08091CC009091CD00181619062CF4A6\r
+:101640001092E3001092E2001CC08091E2009091A1\r
+:10165000E3008F3F910541F03CF0EFEFF0E0F093B5\r
+:10166000E300E093E2000DC08091E2009091E3007E\r
+:1016700081309F4F34F421E03FEF3093E30020931B\r
+:10168000E2008091D400813009F0B3C08091CA009B\r
+:101690009091CB00892B89F41092E1001092E00028\r
+:1016A00010927F0010927E0010927A0010927B00C0\r
+:1016B00010927C0010927D009CC00091CA00109195\r
+:1016C000CB008091C1009091C200081B190BB8019A\r
+:1016D000882777FD8095982FC0907A00D0907B0066\r
+:1016E000E0907C00F0907D00C60ED71EE81EF91E2B\r
+:1016F000C0927A00D0927B00E0927C00F0927D0054\r
+:101700000E94770F27E73EEB4FE15DE30E946410F4\r
+:101710004B015C01C701B6010E94770F27E137EB4F\r
+:1017200041E55AE30E9464109B01AC01C501B4017C\r
+:101730000E94710E6B017C0180917E0090917F0070\r
+:10174000B801681B790B882777FD8095982F0E9438\r
+:10175000770F20E030E0A9010E9464109B01AC01EA\r
+:10176000C701B6010E94710E0E94440F7093E10000\r
+:101770006093E00010937F0000937E008091E00072\r
+:101780009091E1001816190634F48091CA009091E6\r
+:10179000CB0097FD0DC08091E0009091E10097FF94\r
+:1017A0000CC08091CA009091CB00181619062CF439\r
+:1017B0001092E1001092E0001CC08091E000909136\r
+:1017C000E1008F3F910541F03CF04FEF50E0509326\r
+:1017D000E1004093E0000DC08091E0009091E100B5\r
+:1017E00081309F4F34F481E09FEF9093E10080932C\r
+:1017F000E00080B326B3807490E0A3E095958795D0\r
+:10180000AA95E1F72770282B20952F702093A90027\r
+:101810008091E6009091E70020916600309167008A\r
+:1018200028173907C9F18091E6009091E700892BCC\r
+:1018300019F485B3837F1CC080916900811107C0B2\r
+:101840008091E6009091E7001816190654F08091F7\r
+:101850006900882351F08091E6009091E70097FF9E\r
+:1018600004C085B3877F846003C085B38B7F8860A5\r
+:1018700085BB8091E6009091E7009093670080938C\r
+:1018800066008091E6009091E70097FF03C0919574\r
+:10189000819591099BBD8ABD8091E4009091E500FE\r
+:1018A000209164003091650028173907C9F18091B3\r
+:1018B000E4009091E500892B19F485B38F7C1CC05E\r
+:1018C00080916800811107C08091E4009091E5004B\r
+:1018D0001816190654F080916800882351F0809101\r
+:1018E000E4009091E50097FF04C085B38F7D80618F\r
+:1018F00003C085B38F7E806285BB8091E4009091A8\r
+:10190000E50090936500809364008091E4009091DD\r
+:10191000E50097FF03C091958195910999BD88BD18\r
+:101920008091E2009091E300209162003091630089\r
+:1019300028173907C1F18091E2009091E300892BCB\r
+:1019400019F485B38F731CC08091D300811107C037\r
+:101950008091E2009091E3001816190654F08091EE\r
+:10196000D300882351F08091E2009091E30097FF2B\r
+:1019700004C085B38F77806403C085B38F7B806894\r
+:1019800085BB8091E2009091E30090936300809387\r
+:1019900062008091E2009091E30097FF03C091956F\r
+:1019A0008195910983BD8091E0009091E1002091A3\r
+:1019B00060003091610028173907C1F18091E00083\r
+:1019C0009091E100892B19F482B3837F1CC0809130\r
+:1019D000D200811107C08091E0009091E1001816BB\r
+:1019E000190654F08091D200882351F08091E000D4\r
+:1019F0009091E10097FF04C082B3877F846003C0A9\r
+:101A000082B38B7F886082BB8091E0009091E1007F\r
+:101A100090936100809360008091E0009091E100DC\r
+:101A200097FF03C09195819591098CBF8091AC007F\r
+:101A30008F5F8093AC0085B7806885BF889585B738\r
+:101A40008F7785BF3AC96F927F929F92AF92BF9274\r
+:101A5000CF92DF92EF92FF920F931F93CF93DF937A\r
+:101A6000CDB7DEB72C970FB6F894DEBF0FBECDBF53\r
+:101A70008C017B013A01FC0117821682838181FF70\r
+:101A800019C1CE0101965C01F801D380F701D3FCA6\r
+:101A90002591D3FE21917F01222309F407C125322C\r
+:101AA00049F4D3FC2591D3FE21917F01253211F019\r
+:101AB000912C1BC0B801822F90E00E94AE116301EF\r
+:101AC0003601E2CF222309F4F1C0622F70E08BEBE4\r
+:101AD00091E02C870E9458112C85892B49F0F70141\r
+:101AE000D3FC2591D3FE21917F0197FEEBCF0CC053\r
+:101AF000233221F4F92DF0619F2EF1CF2C3639F4E9\r
+:101B0000292D2068922EEBCF222309F4CFC0622F1B\r
+:101B100070E084EB91E02C870E9458112C85892B72\r
+:101B200041F06301F4E0CF0ED11CB8018FE390E0E7\r
+:101B300012C0233641F0233789F0233521F5F92DE2\r
+:101B4000F1609F2E0BC0630122E0C20ED11CB801D0\r
+:101B5000F301808191810E94AE11B2CF630122E036\r
+:101B6000C20ED11CF30160807180F30190FC85915D\r
+:101B700090FE81913F01882309F4A2CFB80190E043\r
+:101B80000E94AE11F2CF243611F0293639F56301E7\r
+:101B900097FE09C0F4E0CF0ED11CF3016081718182\r
+:101BA000828193810AC0F2E0CF0ED11CF3016081E3\r
+:101BB0007181882777FD8095982FF92DFF7E9F2EC4\r
+:101BC00097FF09C090958095709561957F4F8F4FD5\r
+:101BD0009F4FF0649F2E2AE030E038C02037A1F0FC\r
+:101BE00040F42835D1F02F3609F060C028E030E00D\r
+:101BF00019C0253719F0283751F058C0292D2F7EEC\r
+:101C0000922E2AE030E00EC0892D8061982E992D09\r
+:101C10009462992E20E130E005C0E92DE4609E2E0B\r
+:101C200020E132E0630197FE09C0F4E0CF0ED11C41\r
+:101C3000F301608171818281938108C0F2E0CF0E4F\r
+:101C4000D11CF3016081718180E090E0A5010E94C8\r
+:101C50000D12782E7A1896FE05C0B8018DE290E03C\r
+:101C60000E94AE1194FE16C0FE01E70DF11D8081A9\r
+:101C7000803381F0B80180E390E00E94AE1192FEC3\r
+:101C800009C0292D2072822F90E0B801885A9F4FF9\r
+:101C90000E94AE117A94F501E70DF11D8081B80123\r
+:101CA00090E00E94AE117110F5CF0ACFF801868145\r
+:101CB000978102C08FEF9FEF2C960FB6F894DEBF8E\r
+:101CC0000FBECDBFDF91CF911F910F91FF90EF908D\r
+:101CD000DF90CF90BF90AF909F907F906F900895CE\r
+:101CE0005058BB27AA270ED0A0C169D130F06ED1C1\r
+:101CF00020F031F49F3F11F41EF45EC10EF4E09524\r
+:101D0000E7FB54C1E92FB3D180F3BA176207730719\r
+:101D10008407950718F071F49EF5CBC10EF4E09599\r
+:101D20000B2EBA2FA02D0B01B90190010C01CA0195\r
+:101D3000A0011124FF27591B99F0593F50F4503E40\r
+:101D400068F11A16F040A22F232F342F4427585F32\r
+:101D5000F3CF469537952795A795F0405395C9F74A\r
+:101D60007EF41F16BA0B620B730B840BBAF0915002\r
+:101D7000A1F0FF0FBB1F661F771F881FC2F70EC0A1\r
+:101D8000BA0F621F731F841F48F487957795679574\r
+:101D9000B795F7959E3F08F0B3CF9395880F08F05D\r
+:101DA0009927EE0F979587950895DCD008F481E088\r
+:101DB000089514D1E3954AC10CD037C107D140F042\r
+:101DC000FED030F021F45F3F19F0F0C0511172C124\r
+:101DD000F3C04DD198F39923C9F35523B1F3951B63\r
+:101DE000550BBB27AA2762177307840738F09F5F3C\r
+:101DF0005F4F220F331F441FAA1FA9F333D00E2EAB\r
+:101E00003AF0E0E830D091505040E695001CCAF717\r
+:101E100029D0FE2F27D0660F771F881FBB1F2617DC\r
+:101E200037074807AB07B0E809F0BB0B802DBF01AF\r
+:101E3000FF2793585F4F2AF09E3F510568F0B6C0C8\r
+:101E400039C15F3FECF3983EDCF386957795679553\r
+:101E5000B795F7959F5FC9F7880F911D9695879560\r
+:101E600097F90895E1E0660F771F881FBB1F62177F\r
+:101E700073078407BA0720F0621B730B840BBA0B3D\r
+:101E8000EE1F88F7E095089504D06894B11112C14F\r
+:101E90000895F5D088F09F5790F0B92F9927B75142\r
+:101EA000A0F0D1F0660F771F881F991F1AF0BA951E\r
+:101EB000C9F712C0B13081F0FCD0B1E00895F9C08B\r
+:101EC000672F782F8827B85F39F0B93FCCF3869514\r
+:101ED00077956795B395D9F73EF490958095709571\r
+:101EE00061957F4F8F4F9F4F0895E89409C097FBEE\r
+:101EF0003EF490958095709561957F4F8F4F9F4FE1\r
+:101F00009923A9F0F92F96E9BB279395F695879524\r
+:101F100077956795B795F111F8CFFAF4BB0F11F4E7\r
+:101F200060FF1BC06F5F7F4F8F4F9F4F16C088238E\r
+:101F300011F096E911C0772321F09EE8872F762FC4\r
+:101F400005C0662371F096E8862F70E060E02AF005\r
+:101F50009A95660F771F881FDAF7880F96958795F1\r
+:101F600097F90895990F0008550FAA0BE0E8FEEFC6\r
+:101F700016161706E807F907C0F012161306E4074D\r
+:101F8000F50798F0621B730B840B950B39F40A2646\r
+:101F900061F0232B242B252B21F408950A2609F424\r
+:101FA000A140A6958FEF811D811D089597F99F6728\r
+:101FB00080E870E060E008959FEF80EC08950024D1\r
+:101FC0000A941616170618060906089500240A949E\r
+:101FD00012161306140605060895EECF50D0E8F346\r
+:101FE000E894E0E0BB279F57F0F02AED3FE049EC92\r
+:101FF00006C0EE0FBB0F661F771F881F28F0B23A8E\r
+:1020000062077307840728F0B25A620B730B840BC4\r
+:10201000E3959A9572F7803830F49A95BB0F661F56\r
+:10202000771F881FD2F79048BAC0092E0394000C7E\r
+:1020300011F4882352F0BB0F40F4BF2B11F460FF62\r
+:1020400004C06F5F7F4F8F4F9F4F0895EF93E0FF66\r
+:1020500006C0A2EA2AED3FE049EC5FEB53DEE5DF84\r
+:102060000F90039401FC9058E6E9F1E0A4C057FDFD\r
+:102070009058440F551F59F05F3F71F04795880FF6\r
+:1020800097FB991F61F09F3F79F08795089512168D\r
+:1020900013061406551FF2CF4695F1DF08C0161639\r
+:1020A00017061806991FF1CF8695710561050894EA\r
+:1020B0000895E894BB2766277727CB0197F9089501\r
+:1020C00051DF08F48FEF08950BD0AFCF78DF28F001\r
+:1020D0007DDF18F0952309F069CF6ECF1124EACF88\r
+:1020E000C6DFA0F3959FD1F3950F50E0551F629F77\r
+:1020F000F001729FBB27F00DB11D639FAA27F00D61\r
+:10210000B11DAA1F649F6627B00DA11D661F829F87\r
+:102110002227B00DA11D621F739FB00DA11D621F6C\r
+:10212000839FA00D611D221F749F3327A00D611D89\r
+:10213000231F849F600D211D822F762F6A2F11246B\r
+:102140009F5750408AF0E1F088234AF0EE0FFF1FBE\r
+:10215000BB1F661F771F881F91505040A9F79E3FF5\r
+:10216000510570F023CFA6CF5F3FECF3983EDCF330\r
+:10217000869577956795B795F795E7959F5FC1F732\r
+:10218000FE2B880F911D9695879597F908959F933B\r
+:1021900025DF0F9007FCEE5F59CF9F3F31F0915044\r
+:1021A00020F4879577956795B795880F911D96953B\r
+:1021B000879597F908959F938F937F936F93FF93DC\r
+:1021C000EF939B01AC0180DFEF91FF9105D02F9140\r
+:1021D0003F914F915F9178CFDF93CF931F930F93F0\r
+:1021E000FF92EF92DF927B018C01689405C0DA2E9A\r
+:1021F000EF0176DFFE01E894A59125913591459197\r
+:102200005591AEF3EF017EDDFE019701A801DA944E\r
+:1022100079F7DF90EF90FF900F911F91CF91DF91B1\r
+:102220000895052E97FB1EF400940E94281157FD77\r
+:1022300007D00E94361107FC03D04EF40C942811ED\r
+:1022400050954095309521953F4F4F4F5F4F0895E2\r
+:1022500090958095709561957F4F8F4F9F4F089512\r
+:10226000EE0FFF1F0590F491E02D0994A1E21A2EC4\r
+:10227000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1F2A\r
+:10228000A217B307E407F50720F0A21BB30BE40B7A\r
+:10229000F50B661F771F881F991F1A9469F76095C1\r
+:1022A0007095809590959B01AC01BD01CF0108957B\r
+:1022B000FC010590061621F00020D9F7C001089511\r
+:1022C0003197CF0108950F931F93CF93DF93EC01C4\r
+:1022D0008B01009731F46115710519F480E090E0ED\r
+:1022E00038C06EE070E081E090E00E946B12FC016B\r
+:1022F0000097A1F380E883830115110571F013871E\r
+:10230000028781E8838380915E0190915F01892B30\r
+:1023100021F4F0935F01E0935E012097C9F0D1872B\r
+:10232000C087838182608383809160019091610185\r
+:10233000892B71F4F0936101E09360018091620157\r
+:1023400090916301892B21F4F0936301E093620182\r
+:10235000CF01DF91CF911F910F9108950F931F939C\r
+:10236000CF93DF93182F092FEB018B8181FD03C0E1\r
+:102370008FEF9FEF20C082FF10C04E815F812C81C4\r
+:102380003D81421753077CF4E881F9819F012F5F5B\r
+:102390003F4F39832883108306C0E885F985812F54\r
+:1023A0000995892B29F72E813F812F5F3F4F3F836E\r
+:1023B0002E83812F902FDF91CF911F910F91089540\r
+:1023C0000F931F93CF93DF93E0916001F091610130\r
+:1023D000238121FF1BC0EC0100E010E08991609196\r
+:1023E000600170916101DB011896ED91FC911997E4\r
+:1023F000882331F00995892B89F30FEF1FEFEECF7A\r
+:102400008AE00995892B11F4C80102C08FEF9FEF74\r
+:10241000DF91CF911F910F910895FA01AA272830DB\r
+:1024200051F1203181F1E8946F936E7F6E5F7F4FA1\r
+:102430008F4F9F4FAF4FB1E03ED0B4E03CD0670F1D\r
+:10244000781F891F9A1FA11D680F791F8A1F911D70\r
+:10245000A11D6A0F711D811D911DA11D20D009F4C0\r
+:1024600068943F912AE0269F11243019305D319302\r
+:10247000DEF6CF010895462F4770405D4193B3E0EB\r
+:102480000FD0C9F7F6CF462F4F70405D4A3318F092\r
+:10249000495D31FD4052419302D0A9F7EACFB4E043\r
+:1024A000A6959795879577956795BA95C9F70097FB\r
+:1024B0006105710508959B01AC010A2E069457959C\r
+:1024C000479537952795BA95C9F7620F731F841FF3\r
+:1024D000951FA01D08950F931F93CF93DF93869FA1\r
+:1024E0008001879F100D969F100D1124C8010E9436\r
+:1024F0008712EC01009729F0A80160E070E00E94CB\r
+:10250000AE13CE01DF91CF911F910F910895CF931C\r
+:10251000DF938230910510F482E090E0E091660153\r
+:10252000F091670120E030E0A0E0B0E0309739F1B1\r
+:102530004081518148175907B8F04817590771F47D\r
+:1025400082819381109729F013969C938E93129712\r
+:102550002CC0909367018093660127C02115310537\r
+:1025600031F04217530718F0A901DB0101C0EF0158\r
+:102570009A01BD01DF010280F381E02DD7CF211543\r
+:102580003105F9F0281B390B2430310580F48A819C\r
+:102590009B816115710521F0FB019383828304C047\r
+:1025A0009093670180936601FE01329644C0FE015C\r
+:1025B000E20FF31F819391932250310939832883CD\r
+:1025C0003AC02091640130916501232B41F42091A0\r
+:1025D0006C0030916D00309365012093640120916F\r
+:1025E0006A0030916B002115310541F42DB73EB7DB\r
+:1025F00040916E0050916F00241B350BE0916401F7\r
+:10260000F0916501E217F307A0F42E1B3F0B28178A\r
+:10261000390778F0AC014E5F5F4F2417350748F05B\r
+:102620004E0F5F1F50936501409364018193919316\r
+:1026300002C0E0E0F0E0CF01DF91CF910895CF93A9\r
+:10264000DF93009709F487C0FC013297138212824E\r
+:10265000C0916601D0916701209781F4208131817A\r
+:10266000280F391F809164019091650182179307AB\r
+:1026700079F5F0936501E09364016DC0DE0120E01F\r
+:1026800030E0AE17BF0750F412964D915C9113974E\r
+:102690009D014115510509F1DA01F3CFB383A283FE\r
+:1026A00040815181840F951F8A179B0771F48D918A\r
+:1026B0009C911197840F951F0296918380831296A7\r
+:1026C0008D919C911397938382832115310529F471\r
+:1026D000F0936701E09366013EC0D9011396FC9325\r
+:1026E000EE9312974D915D91A40FB51FEA17FB076A\r
+:1026F00079F480819181840F951F0296D9011196FA\r
+:102700009C938E938281938113969C938E931297C0\r
+:10271000E0E0F0E08A819B81009719F0FE01EC0176\r
+:10272000F9CFCE01029628813981820F931F209123\r
+:102730006401309165012817390769F4309729F44D\r
+:10274000109267011092660102C013821282D09328\r
+:102750006501C0936401DF91CF910895DC0101C050\r
+:0E2760006D9341505040E0F70895F894FFCF7C\r
+:10276E0000800080008000800101000068012000D0\r
+:0A277E000D0A53746172740D00001F\r
 :00000001FF\r
diff --git a/scripts/pid_manual.py b/scripts/pid_manual.py
new file mode 100755 (executable)
index 0000000..77a7bce
--- /dev/null
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+# -*- coding: iso-8859-15 -*-
+
+import sys
+import struct
+from time import sleep
+from i2c import i2c_write_reg, i2c_read_reg
+
+KP=0.034
+KI=0.02
+KD=0.0
+PID_T=0.01
+STEP_PER_M_AVG=4171.4
+eold1 = 0.0
+eold2 = 0.0
+eold3 = 0.0
+eold4 = 0.0
+esum1 = 0.0
+esum2 = 0.0
+esum3 = 0.0
+esum4 = 0.0
+speed1_wish=float(sys.argv[1])*STEP_PER_M_AVG
+speed2_wish=float(sys.argv[1])*STEP_PER_M_AVG
+speed3_wish=float(sys.argv[2])*STEP_PER_M_AVG
+speed4_wish=float(sys.argv[2])*STEP_PER_M_AVG
+
+def set_pwm(pwm1, pwm2, pwm3, pwm4):
+       i2c_write_reg(0x50, 0x1, struct.pack(">h", pwm1))
+       i2c_write_reg(0x50, 0x3, struct.pack(">h", pwm2))
+       i2c_write_reg(0x50, 0x5, struct.pack(">h", pwm3))
+       i2c_write_reg(0x50, 0x7, struct.pack(">h", pwm4))
+
+if __name__ == "__main__":
+       for i in range(200):
+               speed1, speed2, speed3, speed4 = struct.unpack(">hhhh", i2c_read_reg(0x50, 0x30, 8))
+               error,  = struct.unpack(">B", i2c_read_reg(0x50, 0xA1, 1))
+
+               if speed1_wish == 0: 
+                       motor1 = 0.0
+                       eold1 = 0.0
+                       esum1 = 0.0
+               else:
+                       e = speed1_wish - speed1
+                       esum1+=e
+                       motor1 = KP*e + KI*PID_T*esum1 + KD/PID_T*(e - eold1)
+                       eold1 = e
+
+                       if (motor1 < 0 and speed1_wish > 0): motor1 = 0 
+                       elif (motor1 > 0 and speed1_wish < 0): motor1 = 0       
+                       elif (motor1 > 255): motor1 = 255
+                       elif (motor1 < -255): motor1 = -255
+
+               if speed2_wish == 0: 
+                       motor2 = 0.0
+                       eold2 = 0.0
+                       esum2 = 0.0
+               else:
+                       e = speed2_wish - speed2
+                       esum2+=e
+                       motor2 = KP*e + KI*PID_T*esum2 + KD/PID_T*(e - eold2)
+                       eold2 = e
+
+                       if (motor2 < 0 and speed2_wish > 0): motor2 = 0 
+                       elif (motor2 > 0 and speed2_wish < 0): motor2 = 0       
+                       elif (motor2 > 255): motor2 = 255
+                       elif (motor2 < -255): motor2 = -255
+
+               if speed3_wish == 0: 
+                       motor3 = 0.0
+                       eold3 = 0.0
+                       esum3 = 0.0
+               else:
+                       e = speed3_wish - speed3
+                       esum3+=e
+                       motor3 = KP*e + KI*PID_T*esum3 + KD/PID_T*(e - eold3)
+                       eold3 = e
+
+                       if (motor3 < 0 and speed3_wish > 0): motor3 = 0 
+                       elif (motor3 > 0 and speed3_wish < 0): motor3 = 0       
+                       elif (motor3 > 255): motor3 = 255
+                       elif (motor3 < -255): motor3 = -255
+
+                       print "Wish=", speed3_wish, "Speed=", speed3, "e=", e, "esum=", esum3, "pwm=", motor3, "error=", error
+
+               if speed4_wish == 0: 
+                       motor4 = 0.0
+                       eold4 = 0.0
+                       esum4 = 0.0
+               else:
+                       e = speed4_wish - speed4
+                       esum4+=e
+                       motor4 = KP*e + KI*PID_T*esum4 + KD/PID_T*(e - eold4)
+                       eold4 = e
+
+                       if (motor4 < 0 and speed4_wish > 0): motor4 = 0 
+                       elif (motor4 > 0 and speed4_wish < 0): motor4 = 0       
+                       elif (motor4 > 255): motor4 = 255
+                       elif (motor4 < -255): motor4 = -255
+
+               set_pwm(motor1, motor2, motor3, motor4)
+
+               sleep(PID_T)
+       set_pwm(0, 0, 0, 0)