igotu2gpx team mailing list archive
-
igotu2gpx team
-
Mailing list archive
-
Message #00751
[Merge] lp:~charles-fleche/igotu2gpx/gt600 into lp:igotu2gpx
yoloosis has proposed merging lp:~charles-fleche/igotu2gpx/gt600 into lp:igotu2gpx.
Requested reviews:
MobileAction i-gotU USB GPS travel logger Mac/Linux developers (igotu2gpx)
For more details, see:
https://code.launchpad.net/~charles-fleche/igotu2gpx/gt600/+merge/46379
The "clean" action now works on a gt-600. The gt-600 is identified as a gt-200e (0x17). Updated the algorithm pseudocode in the HACKING file.
--
https://code.launchpad.net/~charles-fleche/igotu2gpx/gt600/+merge/46379
Your team MobileAction i-gotU USB GPS travel logger Mac/Linux developers is requested to review the proposed merge of lp:~charles-fleche/igotu2gpx/gt600 into lp:igotu2gpx.
=== modified file 'HACKING'
--- HACKING 2010-03-17 06:59:00 +0000
+++ HACKING 2011-01-15 11:01:19 +0000
@@ -347,6 +347,32 @@
----
purge = false
+ blocks = 0x800
+ for i = blocks - 1; i > 0; --i:
+ if purge:
+ while UnknownWriteCommand2(0x0001) != 0x00:
+ pass
+ else:
+ if ReadCommand(i * 0x1000, 0x10) != rep(0xff, 0x10):
+ purge = true
+ else:
+ continue
+ UnknownWriteCommand1(0x00)
+ WriteCommand(0x20, i * 0x1000, '')
+ if purge:
+ UnknownPurgeCommand1(0x1e)
+ UnknownPurgeCommand1(0x1f)
+ while UnknownWriteCommand2(0x0001) != 0x00:
+ pass
+ UnknownPurgeCommand1(0x1e)
+ UnknownPurgeCommand1(0x1f)
+----
+
+GT-600, Firmware 5.24, @trip PC 3.2 1012.751
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+----
+ purge = false
blocks = 0x200
for i = blocks - 1; i > 0; --i:
if purge:
@@ -360,10 +386,12 @@
UnknownWriteCommand1(0x00)
WriteCommand(0x20, i * 0x1000, '')
if purge:
+ UnknownPurgeCommand1(0x1d)
UnknownPurgeCommand1(0x1e)
UnknownPurgeCommand1(0x1f)
while UnknownWriteCommand2(0x0001) != 0x00:
pass
+ UnknownPurgeCommand1(0x1d)
UnknownPurgeCommand1(0x1e)
UnknownPurgeCommand1(0x1f)
----
@@ -413,9 +441,9 @@
0x80: LED flashing when valid data is recorded is disabled
0x0004: uint8 max allowed time when button is pushed and start tracer mode?
0x0005: uint8 initial timeout when button is pushed and start tracer mode?
- 0x0004: uint8 max allowed time when RTC power of GPS is lost (data/time is
+ 0x0006: uint8 max allowed time when RTC power of GPS is lost (data/time is
not a valid value)
- 0x0005: uint8 initial timeout when RTC power of GPS is lost (data/time is
+ 0x0007: uint8 initial timeout when RTC power of GPS is lost (data/time is
not a valid value)
0x0008: uint8 schedule date offset: start date = utc date + offset
0x0009..0x00ff: uint4 schedule table plans (1 if no schedule used,
=== modified file 'src/lib/igotu/igotucontrol.cpp'
--- src/lib/igotu/igotucontrol.cpp 2010-07-05 12:58:10 +0000
+++ src/lib/igotu/igotucontrol.cpp 2011-01-15 11:01:19 +0000
@@ -478,6 +478,7 @@
model.sendAndReceive();
unsigned blocks = 1;
+ bool run_UnknownPurgeCommand1_0x1d = false;
switch (model.modelId()) {
case ModelCommand::Gt100:
@@ -489,6 +490,10 @@
case ModelCommand::Gt200:
blocks = 0x100;
break;
+ case ModelCommand::Gt200e:
+ blocks = 0x800;
+ run_UnknownPurgeCommand1_0x1d = true;
+ break;
default:
throw Exception(IgotuControl::tr
("%1: Unable to clear memory of this GPS tracker model. "
@@ -517,10 +522,14 @@
.sendAndReceive();
}
if (purgeBlocks) {
+ if (run_UnknownPurgeCommand1_0x1d)
+ UnknownPurgeCommand1(connection.get(), 0x1d).sendAndReceive();
UnknownPurgeCommand1(connection.get(), 0x1e).sendAndReceive();
UnknownPurgeCommand1(connection.get(), 0x1f).sendAndReceive();
waitForWrite();
}
+ if (run_UnknownPurgeCommand1_0x1d)
+ UnknownPurgeCommand1(connection.get(), 0x1d).sendAndReceive();
UnknownPurgeCommand1(connection.get(), 0x1e).sendAndReceive();
UnknownPurgeCommand1(connection.get(), 0x1f).sendAndReceive();
emit commandRunning(blocks, blocks);