rodrigoenriquez / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Once the relay is turned on - it can not be turned off #374

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
In a waypoint file:
DO_SET_RELAY,1,1,0,0 will turn ON the relay
DO_SET_RELAY,1,0,0,0 will not turn the relay OFF

DO_REPEAT_RELAY,1,5,10 will cause the relay to blink 4 times then turn ON and 
STAY ON.
DO_SET_RELAY,1,0,0,0 will not turn the relay OFF

The only way to turn off the relay is to reset the APM.

Example file:
#define WP_RADIUS 30 // What is the minimum distance to reach a waypoint?
#define LOITER_RADIUS 60    // How close to Loiter?
#define HOLD_CURRENT_ALT 0  // 1 = hold the current altitude, 0 = use the 
defined altitude to for RTL
#define ALT_TO_HOLD 50

float mission[][5] = {
{WAYPOINT,0,150,33.1272468,-117.2863845},
{WAYPOINT,0,189,33.1274719,-117.2849121},
{DO_SET_RELAY,1,1,0,0},           //TURNS RELAY ON
{DO_SET_RELAY,1,0,0,0},           //DOES NOT TURN THE RELAY OFF
{WAYPOINT,0,150,33.1277236,-117.2834396},
{WAYPOINT,0,150,33.1284065,-117.2837219},
{WAYPOINT,0,150,33.1277236,-117.2881164},
};

What version of the product are you using? On what operating system?
ArduPilotMega 2.2.0 HIL as loaded with APM Planner 1.0.20.

Original issue reported on code.google.com by stafford...@att.net on 30 Jun 2011 at 6:34

GoogleCodeExporter commented 8 years ago
I have checked this out and found that the relay commands are working fine with 
the APM 2.2.1 firmware, turning the relay both on and off.  However, APM 
Planner has the fields for the set relay command mislabeled.  The first field 
(rather than the second) should be labelled on/off and set to 1=on or 0=off as 
desired.  

I have notified Mike O of this issue.

Original comment by dewei...@gmail.com on 5 Jul 2011 at 8:12

GoogleCodeExporter commented 8 years ago
Got it.  Thanks.

Original comment by stafford...@att.net on 5 Jul 2011 at 9:00

GoogleCodeExporter commented 8 years ago
fixed the cell naming.

Original comment by Meee...@gmail.com on 9 Jul 2011 at 1:07