More implementation for the serial side on IO; fix a couple of bugs on the FMU side.

Still needs serial init and some more testing/config on the FMU side, but closer to being ready to test.
This commit is contained in:
px4dev
2013-06-28 23:39:35 -07:00
parent 90c458cb61
commit d1562f926f
6 changed files with 109 additions and 81 deletions
+9
View File
@@ -44,6 +44,7 @@
#include <string.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_pwm_output.h>
#include "px4io.h"
#include "protocol.h"
@@ -349,10 +350,18 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
case PX4IO_P_SETUP_RELAYS:
value &= PX4IO_P_SETUP_RELAYS_VALID;
r_setup_relays = value;
#ifdef POWER_RELAY1
POWER_RELAY1(value & (1 << 0) ? 1 : 0);
#endif
#ifdef POWER_RELAY2
POWER_RELAY2(value & (1 << 1) ? 1 : 0);
#endif
#ifdef POWER_ACC1
POWER_ACC1(value & (1 << 2) ? 1 : 0);
#endif
#ifdef POWER_ACC2
POWER_ACC2(value & (1 << 3) ? 1 : 0);
#endif
break;
case PX4IO_P_SETUP_SET_DEBUG: