Browse Source

GPS日期,1,2月年份错误修复

zr-sdk-4.1.16
zbr 4 years ago
parent
commit
ae50353160
  1. 2
      ArduCopter/version.h
  2. 2
      copy.sh
  3. 10
      libraries/AP_GPS/GPS_Backend.cpp
  4. 3
      zr-v4.sh

2
ArduCopter/version.h

@ -6,7 +6,7 @@
#include "ap_version.h" #include "ap_version.h"
#define THISFIRMWARE "ZRUAV v4.0.8-RC7" //"ArduCopter V4.0.0" #define THISFIRMWARE "ZRUAV v4.0.8-RC8" //"ArduCopter V4.0.0"
// the following line is parsed by the autotest scripts // the following line is parsed by the autotest scripts
#define FIRMWARE_VERSION 4,0,8,FIRMWARE_VERSION_TYPE_OFFICIAL #define FIRMWARE_VERSION 4,0,8,FIRMWARE_VERSION_TYPE_OFFICIAL

2
copy.sh

@ -1,2 +1,2 @@
sudo cp ./build/zr-v4/bin/arducopter.apj /mnt/f/_01-work/100\=data/固件/zr-v4/wsl/hexa-zrv4-v4.0.8-rc7-test.px4 sudo cp ./build/zr-v4/bin/arducopter.apj /mnt/f/_01-work/100\=data/固件/zr-v4/wsl/qusd-zrv4-v4.0.8-rc8.px4

10
libraries/AP_GPS/GPS_Backend.cpp

@ -90,11 +90,11 @@ void AP_GPS_Backend::make_gps_time(uint32_t bcd_date, uint32_t bcd_milliseconds)
min = v % 100; v /= 100; min = v % 100; v /= 100;
hour = v % 100; hour = v % 100;
int8_t rmon = mon - 2; // int8_t rmon = mon - 2;
if (0 >= rmon) { // if (0 >= rmon) {
rmon += 12; // rmon += 12;
year -= 1; // year -= 1;
} // }
time_t rawtime; time_t rawtime;
struct tm* timeinfo; struct tm* timeinfo;

3
zr-v4.sh

@ -1,2 +1,3 @@
./waf configure --board zr-v4 ./waf configure --board zr-v4
./waf --targets bin/arducopter --upload ./waf copter
cp ./build/zr-v4/bin/arducopter.apj /mnt/f/_01-work/100\=data/固件/zr-v4/wsl/qusd-zrv4-v4.0.8-rc8.px4

Loading…
Cancel
Save