1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 04:15:28 +03:00

fixing datatype and adding new property

This commit is contained in:
cTn 2013-11-09 09:28:37 +01:00
parent 645d726bc1
commit 0cc045317b
2 changed files with 4 additions and 2 deletions

View file

@ -268,10 +268,11 @@ function process_data(command, message_buffer, message_length_expected) {
case MSP_codes.MSP_RAW_GPS:
GPS_DATA.fix = data.getUint8(0);
GPS_DATA.numSat = data.getUint8(1);
GPS_DATA.lat = data.getUint32(2, 1);
GPS_DATA.lon = data.getUint32(6, 1);
GPS_DATA.lat = data.getInt32(2, 1);
GPS_DATA.lon = data.getInt32(6, 1);
GPS_DATA.alt = data.getUint16(10, 1);
GPS_DATA.speed = data.getUint16(12, 1);
GPS_DATA.ground_course = data.getUint16(14, 1);
break;
case MSP_codes.MSP_COMP_GPS:
GPS_DATA.distanceToHome = data.getUint16(0, 1);

View file

@ -67,6 +67,7 @@ var GPS_DATA = {
lon: 0,
alt: 0,
speed: 0,
ground_course: 0,
distanceToHome: 0,
ditectionToHome: 0,
update: 0,