|
NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
Go to the documentation of this file.
19 #ifndef SIGNAL_LIGHTS_SIGNAL_LIGHTS_H_
20 #define SIGNAL_LIGHTS_SIGNAL_LIGHTS_H_
25 #include "../custom_i2c/i2c.h"
77 } LEDC_COMMAND_INSTRUCTION;
93 } LEDC_TELEMETRY_STATUS;
114 Device(
const char *bus, uint8_t addr);
115 int read(uint8_t *buf,
unsigned int length);
116 int write(uint8_t *buf,
unsigned int length);
153 uint16_t Read(uint8_t *buff, uint16_t len);
154 uint16_t Read(uint8_t *buff);
155 uint16_t Write(uint8_t *buff, uint16_t len);
156 uint8_t ComputeChecksum(uint8_t *buf,
size_t size);
163 size_t block_index_, metadata_index_;
164 std::string hash_, time_;
169 #endif // SIGNAL_LIGHTS_SIGNAL_LIGHTS_H_
Definition: signal_lights.h:27
uint8_t range
Definition: signal_lights.h:73
LEDC_ERROR
Definition: signal_lights.h:52
@ LEDC_STATE_ERROR
Definition: signal_lights.h:49
#define BLOCK_SIZE
Definition: signal_lights.h:33
@ LEDC_MODE_SHUTDOWN
Definition: signal_lights.h:36
Definition: signal_lights.h:85
std::string GetHash()
Definition: signal_lights.h:145
void SetAll(uint8_t red, uint8_t green, uint8_t blue)
Definition: signal_lights.cc:74
@ LEDC_MODE_NOMINAL
Definition: signal_lights.h:37
Definition: signal_lights.h:123
@ LEDC_ERROR_PACKET_CRC
Definition: signal_lights.h:54
uint8_t state
Definition: signal_lights.h:91
uint8_t raw
Definition: signal_lights.h:86
LEDC_MODE
Definition: signal_lights.h:35
@ LEDC_STATE_OOR_STATE
Definition: signal_lights.h:43
METADATA_TYPE
Definition: signal_lights.h:100
Definition: signal_lights.h:112
@ LEDC_MODE_INIT
Definition: signal_lights.h:38
@ LEDC_STATE_RESERVED
Definition: signal_lights.h:47
uint8_t render
Definition: signal_lights.h:71
LEDC_COMMAND
Definition: signal_lights.h:83
uint8_t mask
Definition: signal_lights.h:72
virtual ~SignalLights()
Definition: signal_lights.cc:58
@ LEDC_STATE_MODE_CHANGE_TO_NOMINAL
Definition: signal_lights.h:45
@ METADATA_TYPE_VERSION
Definition: signal_lights.h:101
@ LEDC_ERROR_NONE
Definition: signal_lights.h:53
@ LEDC_ERROR_OVERRUN
Definition: signal_lights.h:56
#define NUM_BLOCKS
Definition: signal_lights.h:32
double GetPollDuration(double rate)
Definition: signal_lights.cc:86
@ LEDC_STATE_PIC_STARTUP
Definition: signal_lights.h:48
bool Set(uint8_t pos, uint8_t red, uint8_t green, uint8_t blue)
Definition: signal_lights.cc:61
uint8_t control
Definition: signal_lights.h:87
uint16_t raw
Definition: signal_lights.h:60
uint8_t raw
Definition: signal_lights.h:70
Device(const char *bus, uint8_t addr)
Definition: signal_lights.cc:30
std::string GetTime()
Definition: signal_lights.h:146
int read(uint8_t *buf, unsigned int length)
Definition: signal_lights.cc:34
SignalLights(const Device &i2c_dev)
Definition: signal_lights.cc:44
LEDC_TELEMETRY
Definition: signal_lights.h:98
uint8_t checksum(uint8_t *buf, size_t len)
Definition: fam_cmd_i2c_node.cc:53
METADATA_VERSION
Definition: signal_lights.h:110
@ LEDC_STATE_MODE_CHANGE_TO_SHUTDOWN
Definition: signal_lights.h:44
Definition: signal_lights.h:69
@ LEDC_STATE_NO_MODE_CHANGE
Definition: signal_lights.h:42
@ LEDC_ERROR_PACKET_DROPPED
Definition: signal_lights.h:55
LEDC_STATE
Definition: signal_lights.h:41
uint8_t error
Definition: signal_lights.h:89
static constexpr double kRenderTime_secs_
Definition: signal_lights.h:125
uint8_t ignore
Definition: signal_lights.h:65
@ LEDC_STATE_TIMEOUT_INDUCED_SHUTDOWN
Definition: signal_lights.h:46
uint8_t green
Definition: signal_lights.h:62
@ METADATA_TYPE_INVALID
Definition: signal_lights.h:102
Definition: signal_lights.h:59
uint8_t mode
Definition: signal_lights.h:75
uint8_t metadata
Definition: signal_lights.h:88
int write(uint8_t *buf, unsigned int length)
Definition: signal_lights.cc:38
uint8_t blue
Definition: signal_lights.h:63
uint8_t red
Definition: signal_lights.h:61
bool Poll()
Definition: signal_lights.cc:91
class signal_lights::SignalPair __attribute__
Definition: signal_lights.h:95