mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
uncrustify libraries/AP_Relay/AP_Relay.cpp
This commit is contained in:
parent
c60cfb33f2
commit
06021825c8
@ -9,41 +9,41 @@
|
||||
|
||||
#include <avr/io.h>
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "wiring.h"
|
||||
#include "wiring.h"
|
||||
#endif
|
||||
|
||||
#include "AP_Relay.h"
|
||||
|
||||
void AP_Relay::on()
|
||||
{
|
||||
PORTL |= B00000100;
|
||||
PORTL |= B00000100;
|
||||
}
|
||||
|
||||
|
||||
void AP_Relay::off()
|
||||
{
|
||||
PORTL &= ~B00000100;
|
||||
PORTL &= ~B00000100;
|
||||
}
|
||||
|
||||
|
||||
void AP_Relay::toggle()
|
||||
{
|
||||
PORTL ^= B00000100;
|
||||
PORTL ^= B00000100;
|
||||
}
|
||||
|
||||
|
||||
void AP_Relay::set(bool status)
|
||||
{
|
||||
if (status)
|
||||
on();
|
||||
else
|
||||
off();
|
||||
if (status)
|
||||
on();
|
||||
else
|
||||
off();
|
||||
}
|
||||
|
||||
|
||||
bool AP_Relay::get()
|
||||
{
|
||||
return PORTL & B00000100;
|
||||
return PORTL & B00000100;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user