start parsing meta information from JSON objects coming through endpoints,
like shutter status and battery status
This commit is contained in:
parent
654ba67237
commit
ab5cbe7d6f
7 changed files with 461 additions and 122 deletions
31
cam-thread.h
Normal file
31
cam-thread.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef _CAM_THREAD_H
|
||||
#define _CAM_THREAD_H
|
||||
|
||||
enum ffcstate_t {FFC_VALID_RAD, FFC_PROGRESS, FFC_UNKNOWN};
|
||||
enum shutterstate_t {sON, sFFC, sUNKNOWN};
|
||||
|
||||
// {
|
||||
// "shutterState":"ON",
|
||||
// "shutterTemperature":310.679992675781,
|
||||
// "usbNotifiedTimestamp":1184542349.84666,
|
||||
// "usbEnqueuedTimestamp":1184542349.85135,
|
||||
// "ffcState":"FFC_VALID_RAD"
|
||||
// }
|
||||
struct shutter_state_t {
|
||||
enum shutterstate_t shutterState; // ON or FFC
|
||||
double shutterTemperature; // in Kelvin? C = Kelvin - 273.15
|
||||
double usbNotifiedTimestamp;
|
||||
double usbEnqueuedTimestamp;
|
||||
enum ffcstate_t ffcState; // FFC_VALID_RAD or FFC_PROGRESS
|
||||
};
|
||||
|
||||
enum chargingState_t {stateNoCharging, stateCharging, stateUNKNOWN};
|
||||
|
||||
struct battery_state_t {
|
||||
enum chargingState_t chargingState;
|
||||
double voltage;
|
||||
int percentage;
|
||||
double chargingCurrent;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue