mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-20 23:04:09 -04:00
Adding bash formatting script using astyle.
This commit is contained in:
parent
63efe302f2
commit
fc12113167
11
Tools/scripts/format.sh
Executable file
11
Tools/scripts/format.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
function format {
|
||||||
|
DIR=$1
|
||||||
|
find $DIR -regex ".*\.\(h\|cpp\|pde\)" -exec astyle {} \;
|
||||||
|
find $DIR -regex ".*\.\(h\|cpp\|pde\)" -exec rm {}.orig \;
|
||||||
|
}
|
||||||
|
|
||||||
|
format apo
|
||||||
|
format ArduRover
|
||||||
|
format ArduBoat
|
||||||
|
format libraries/APO
|
@ -35,10 +35,10 @@ void AP_Controller::setAllRadioChannelsToNeutral() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AP_Controller::setAllRadioChannelsManually() {
|
void AP_Controller::setAllRadioChannelsManually() {
|
||||||
//_hal->debug->printf_P(PSTR("\tsize: %d\n"),_hal->rc.getSize());
|
//_hal->debug->printf_P(PSTR("\tsize: %d\n"),_hal->rc.getSize());
|
||||||
for (uint8_t i = 0; i < _hal->rc.getSize(); i++) {
|
for (uint8_t i = 0; i < _hal->rc.getSize(); i++) {
|
||||||
_hal->rc[i]->setUsingRadio();
|
_hal->rc[i]->setUsingRadio();
|
||||||
//_hal->debug->printf_P(PSTR("\trc %d: %f\n"),i,_hal->rc[i]->getPosition());
|
//_hal->debug->printf_P(PSTR("\trc %d: %f\n"),i,_hal->rc[i]->getPosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ void AP_Controller::setMotors() {
|
|||||||
case MAV_STATE_ACTIVE: {
|
case MAV_STATE_ACTIVE: {
|
||||||
digitalWrite(_hal->aLedPin, HIGH);
|
digitalWrite(_hal->aLedPin, HIGH);
|
||||||
setMotorsActive();
|
setMotorsActive();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MAV_STATE_EMERGENCY: {
|
case MAV_STATE_EMERGENCY: {
|
||||||
digitalWrite(_hal->aLedPin, LOW);
|
digitalWrite(_hal->aLedPin, LOW);
|
||||||
|
Loading…
Reference in New Issue
Block a user