Owne / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Bytes reversed in MediaTek library "time" field #275

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run MediaTek test example program. Time is messed up.
2.
3.

What is the expected output? What do you see instead?
Expected: Increasing TOW (by 1000 each second)
See: crazy +/- swings on "TIM:"

What version of the product are you using? On what operating system?
ArduPilot Mega MediaTek libraries for both "old" and "new" (1.6) firmware
Arduino 22 on OSX 10.6.6

Please provide any additional information below.
Fix is provided. Remove "_swapl" as shown below. Time works fine then...

time    = _swapl(&_buffer.msg.utc_time);  // <<<<<< OLD LINE
time = _buffer.msg.utc_time;      // <<<<<< CORRECT LINE

Original issue reported on code.google.com by CentralF...@gmail.com on 23 Jan 2011 at 10:18

GoogleCodeExporter commented 8 years ago
Fixed 
Current implementation in now millisecond time of day
Note that the dev team is evaluating time stamp formats and hopes to decide on 
a single format soon.  All gps drivers will be switched to the same format once 
a decision is made.

Original comment by dewei...@gmail.com on 9 Feb 2011 at 2:06