HAL_PX4: fixed definition of relay and piezo pins

This commit is contained in:
Andrew Tridgell 2013-07-11 13:49:25 +10:00
parent 0916388ab5
commit 83b13c3d88
2 changed files with 5 additions and 2 deletions

View File

@ -96,7 +96,7 @@ void PX4GPIO::write(uint8_t pin, uint8_t value)
}
break;
case PIEZO_PIN: // Piezo beeper
case PX4_GPIO_PIEZO_PIN: // Piezo beeper
if (value == LOW) { // this is inverted
ioctl(_tone_alarm_fd, TONE_SET_ALARM, 3); // Alarm on !!
//::write(_tone_alarm_fd, &user_tune, sizeof(user_tune));
@ -105,7 +105,7 @@ void PX4GPIO::write(uint8_t pin, uint8_t value)
}
break;
case 99: // Ext Relay
case PX4_GPIO_EXT_RELAY_PIN: // Ext Relay
if (value == LOW) {
ioctl(_gpio_fd, GPIO_CLEAR, GPIO_EXT_1);
} else {

View File

@ -5,6 +5,9 @@
#include <AP_HAL_PX4.h>
#define PX4_GPIO_PIEZO_PIN 110
#define PX4_GPIO_EXT_RELAY_PIN 111
class PX4::PX4GPIO : public AP_HAL::GPIO {
public:
PX4GPIO();