parent
9aa59b3fe9
commit
45fa51c071
@ -1 +1,6 @@
|
||||
config.h
|
||||
.pio
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
||||
src/config.h
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
]
|
||||
}
|
@ -1,13 +1,19 @@
|
||||
#ifndef SG112A_H
|
||||
#define SG112A_H
|
||||
|
||||
struct lora_data {
|
||||
uint8_t bat;
|
||||
int16_t ppm;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
class SG112A {
|
||||
private:
|
||||
void sendCmd(uint8_t *cmd, uint8_t len);
|
||||
uint16_t crc16(uint8_t *cmd, uint8_t len);
|
||||
uint16_t getPPM(void);
|
||||
public:
|
||||
SG112A(void);
|
||||
uint16_t getPPM(void);
|
||||
void getSensorData(lora_data &loradata);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in new issue