uncrustify libraries/APM_RC/examples/APM2_radio/APM2_radio.pde

This commit is contained in:
uncrustify 2012-08-16 23:20:41 -07:00 committed by Pat Hickey
parent 496553898e
commit 695c0e5239

View File

@ -1,10 +1,10 @@
/* /*
Example of APM_RC library. * Example of APM_RC library.
Code by Jordi MuÒoz and Jose Julio. DIYDrones.com * Code by Jordi MuÒoz and Jose Julio. DIYDrones.com
*
Print Input values and send Output to the servos * Print Input values and send Output to the servos
(Works with last PPM_encoder firmware) * (Works with last PPM_encoder firmware)
*/ */
#include <Arduino_Mega_ISR_Registry.h> #include <Arduino_Mega_ISR_Registry.h>
#include <APM_RC.h> // ArduPilot Mega RC Library #include <APM_RC.h> // ArduPilot Mega RC Library
@ -34,9 +34,9 @@ void setup()
void loop() void loop()
{ {
// New radio frame? (we could use also if((millis()- timer) > 20) // New radio frame? (we could use also if((millis()- timer) > 20)
if (APM_RC.GetState() == 1){ if (APM_RC.GetState() == 1) {
Serial.print("CH:"); Serial.print("CH:");
for(int i = 0; i < 8; i++){ for(int i = 0; i < 8; i++) {
Serial.print(APM_RC.InputCh(i)); // Print channel values Serial.print(APM_RC.InputCh(i)); // Print channel values
Serial.print(","); Serial.print(",");
APM_RC.OutputCh(i, APM_RC.InputCh(i)); // Copy input to Servos APM_RC.OutputCh(i, APM_RC.InputCh(i)); // Copy input to Servos