aboutsummaryrefslogtreecommitdiff
path: root/src/modules/sdlog2/sdlog2.c
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-06-12 12:47:00 +0200
committerJulian Oes <julian@oes.ch>2013-06-12 12:47:00 +0200
commitec08dec8bae403f463ebf9e9a7b71b399ed7b97a (patch)
tree9b888df8a8b20b648ee5b3b57a9dbd0b03542a1d /src/modules/sdlog2/sdlog2.c
parent7f90ebf537f226bc974a9d6023b67a9b32dccfe3 (diff)
downloadpx4-firmware-ec08dec8bae403f463ebf9e9a7b71b399ed7b97a.tar.gz
px4-firmware-ec08dec8bae403f463ebf9e9a7b71b399ed7b97a.tar.bz2
px4-firmware-ec08dec8bae403f463ebf9e9a7b71b399ed7b97a.zip
Two hacks here to make it compile
Diffstat (limited to 'src/modules/sdlog2/sdlog2.c')
-rw-r--r--src/modules/sdlog2/sdlog2.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index a14bd6f80..8c5ec092d 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -861,11 +861,16 @@ int sdlog2_thread_main(int argc, char *argv[])
if (fds[ifds++].revents & POLLIN) {
// Don't orb_copy, it's already done few lines above
log_msg.msg_type = LOG_STAT_MSG;
- log_msg.body.log_STAT.state = (unsigned char) buf_status.state_machine;
- log_msg.body.log_STAT.flight_mode = (unsigned char) buf_status.flight_mode;
- log_msg.body.log_STAT.manual_control_mode = (unsigned char) buf_status.manual_control_mode;
- log_msg.body.log_STAT.manual_sas_mode = (unsigned char) buf_status.manual_sas_mode;
- log_msg.body.log_STAT.armed = (unsigned char) buf_status.flag_system_armed;
+ // XXX fix this
+ // log_msg.body.log_STAT.state = (unsigned char) buf_status.state_machine;
+ // log_msg.body.log_STAT.flight_mode = (unsigned char) buf_status.flight_mode;
+ // log_msg.body.log_STAT.manual_control_mode = (unsigned char) buf_status.manual_control_mode;
+ // log_msg.body.log_STAT.manual_sas_mode = (unsigned char) buf_status.manual_sas_mode;
+ log_msg.body.log_STAT.state = 0;
+ log_msg.body.log_STAT.flight_mode = 0;
+ log_msg.body.log_STAT.manual_control_mode = 0;
+ log_msg.body.log_STAT.manual_sas_mode = 0;
+ log_msg.body.log_STAT.armed = (unsigned char) buf_status.flag_fmu_armed; /* XXX fmu armed correct? */
log_msg.body.log_STAT.battery_voltage = buf_status.voltage_battery;
log_msg.body.log_STAT.battery_current = buf_status.current_battery;
log_msg.body.log_STAT.battery_remaining = buf_status.battery_remaining;
@@ -1165,8 +1170,9 @@ void handle_command(struct vehicle_command_s *cmd)
void handle_status(struct vehicle_status_s *status)
{
- if (status->flag_system_armed != flag_system_armed) {
- flag_system_armed = status->flag_system_armed;
+ /* XXX fmu armed correct? */
+ if (status->flag_fmu_armed != flag_system_armed) {
+ flag_system_armed = status->flag_fmu_armed;
if (flag_system_armed) {
sdlog2_start_log();