mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
some more minor fixes for sys_time: send time in TAKEOFF message as uint16_t
This commit is contained in:
@@ -565,7 +565,8 @@ void monitor_task( void ) {
|
|||||||
estimator_hspeed_mod > MIN_SPEED_FOR_TAKEOFF) {
|
estimator_hspeed_mod > MIN_SPEED_FOR_TAKEOFF) {
|
||||||
estimator_flight_time = 1;
|
estimator_flight_time = 1;
|
||||||
launch = TRUE; /* Not set in non auto launch */
|
launch = TRUE; /* Not set in non auto launch */
|
||||||
DOWNLINK_SEND_TAKEOFF(DefaultChannel, DefaultDevice, &sys_time.nb_sec);
|
uint16_t time_sec = sys_time.nb_sec;
|
||||||
|
DOWNLINK_SEND_TAKEOFF(DefaultChannel, DefaultDevice, &time_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_GPIO
|
#ifdef USE_GPIO
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ static inline void main_periodic_task( void ) {
|
|||||||
DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);
|
DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);
|
||||||
PeriodicSendDlValue(DefaultChannel);
|
PeriodicSendDlValue(DefaultChannel);
|
||||||
});
|
});
|
||||||
DOWNLINK_SEND_MOTOR_BENCH_STATUS(DefaultChannel, DefaultDevice, &cpu_time_ticks, &throttle, &rpm, &s , &thrust, &torque, &cpu_time_sec, &mb_modes_mode);
|
uint16_t time_secs = sys_time.nb_sec;
|
||||||
|
DOWNLINK_SEND_MOTOR_BENCH_STATUS(DefaultChannel, DefaultDevice, &sys_time.nb_sec_rem, &throttle, &rpm, &s , &thrust, &torque, &time_secs, &mb_modes_mode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ static inline void main_init( void ) {
|
|||||||
static inline void main_periodic_task( void ) {
|
static inline void main_periodic_task( void ) {
|
||||||
LED_TOGGLE(1);
|
LED_TOGGLE(1);
|
||||||
Uart0PrintString("demo3 running since ");
|
Uart0PrintString("demo3 running since ");
|
||||||
Uart0PrintHex16(cpu_time_sec);
|
Uart0PrintHex32(cpu_time_sec);
|
||||||
Uart0PrintString(" seconds\n");
|
Uart0PrintString(" seconds\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,5 +28,6 @@ static inline void main_init( void ) {
|
|||||||
|
|
||||||
static inline void main_periodic_task( void ) {
|
static inline void main_periodic_task( void ) {
|
||||||
LED_TOGGLE(1);
|
LED_TOGGLE(1);
|
||||||
DOWNLINK_SEND_TAKEOFF(&cpu_time_sec);
|
uint16_t time_sec = sys_time.nb_sec;
|
||||||
|
DOWNLINK_SEND_TAKEOFF(&time_sec);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ static inline void main_init( void ) {
|
|||||||
|
|
||||||
static inline void main_periodic_task( void ) {
|
static inline void main_periodic_task( void ) {
|
||||||
// LED_TOGGLE(1);
|
// LED_TOGGLE(1);
|
||||||
DOWNLINK_SEND_TAKEOFF(&cpu_time_sec);
|
uint16_t time_sec = sys_time.nb_sec;
|
||||||
|
DOWNLINK_SEND_TAKEOFF(&time_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void main_event_task( void ) {
|
static inline void main_event_task( void ) {
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ static inline void main_init( void ) {
|
|||||||
|
|
||||||
static inline void main_periodic_task( void ) {
|
static inline void main_periodic_task( void ) {
|
||||||
LED_TOGGLE(1);
|
LED_TOGGLE(1);
|
||||||
// DOWNLINK_SEND_TAKEOFF(&cpu_time_sec);
|
//uint16_t time_sec = sys_time.nb_sec;
|
||||||
|
// DOWNLINK_SEND_TAKEOFF(&time_sec);
|
||||||
usb_serial_transmit( 'A' );
|
usb_serial_transmit( 'A' );
|
||||||
usb_serial_transmit( '\n' );
|
usb_serial_transmit( '\n' );
|
||||||
|
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ void parse_ins_msg( void ) {
|
|||||||
gps.nb_channels = XSENS_GPSStatus_nch(xsens_msg_buf);
|
gps.nb_channels = XSENS_GPSStatus_nch(xsens_msg_buf);
|
||||||
gps.num_sv = 0;
|
gps.num_sv = 0;
|
||||||
|
|
||||||
gps.last_fix_time = cpu_time_sec;
|
gps.last_fix_time = sys_time.nb_sec;
|
||||||
|
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
// Do not write outside buffer
|
// Do not write outside buffer
|
||||||
@@ -417,7 +417,7 @@ void parse_ins_msg( void ) {
|
|||||||
#ifdef GPS_LED
|
#ifdef GPS_LED
|
||||||
LED_TOGGLE(GPS_LED);
|
LED_TOGGLE(GPS_LED);
|
||||||
#endif
|
#endif
|
||||||
gps.last_fix_time = cpu_time_sec;
|
gps.last_fix_time = sys_time.nb_sec;
|
||||||
gps.week = 0; // FIXME
|
gps.week = 0; // FIXME
|
||||||
gps.tow = XSENS_DATA_RAWGPS_itow(xsens_msg_buf,offset) * 10;
|
gps.tow = XSENS_DATA_RAWGPS_itow(xsens_msg_buf,offset) * 10;
|
||||||
gps.lla_pos.lat = RadOfDeg(XSENS_DATA_RAWGPS_lat(xsens_msg_buf,offset));
|
gps.lla_pos.lat = RadOfDeg(XSENS_DATA_RAWGPS_lat(xsens_msg_buf,offset));
|
||||||
@@ -525,7 +525,7 @@ void parse_ins_msg( void ) {
|
|||||||
}
|
}
|
||||||
if (XSENS_MASK_Position(xsens_output_mode)) {
|
if (XSENS_MASK_Position(xsens_output_mode)) {
|
||||||
#if (! USE_GPS_XSENS_RAW_DATA) && USE_GPS_XSENS
|
#if (! USE_GPS_XSENS_RAW_DATA) && USE_GPS_XSENS
|
||||||
gps.last_fix_time = cpu_time_sec;
|
gps.last_fix_time = sys_time.nb_sec;
|
||||||
|
|
||||||
lla_f.lat = RadOfDeg(XSENS_DATA_Position_lat(xsens_msg_buf,offset));
|
lla_f.lat = RadOfDeg(XSENS_DATA_Position_lat(xsens_msg_buf,offset));
|
||||||
lla_f.lon = RadOfDeg(XSENS_DATA_Position_lon(xsens_msg_buf,offset));
|
lla_f.lon = RadOfDeg(XSENS_DATA_Position_lon(xsens_msg_buf,offset));
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ static inline void main_periodic_task( void ) {
|
|||||||
|
|
||||||
RunOnceEvery(51, {
|
RunOnceEvery(51, {
|
||||||
/*LED_TOGGLE(2);*/
|
/*LED_TOGGLE(2);*/
|
||||||
uint32_t blaaa= cpu_time_sec;
|
DOWNLINK_SEND_TIME(DefaultChannel, DefaultDevice, &sys_time.nb_sec);
|
||||||
DOWNLINK_SEND_TIME(DefaultChannel, DefaultDevice, &blaaa);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
RunOnceEvery(10, {radio_control_periodic_task();});
|
RunOnceEvery(10, {radio_control_periodic_task();});
|
||||||
|
|||||||
Reference in New Issue
Block a user