Device: WiVI: Add VIN support

This commit is contained in:
Emily Brooks
2025-10-08 15:49:03 -04:00
committed by Kyle Schwarz
parent ec350b522a
commit 99a2ca4f0d
5 changed files with 181 additions and 10 deletions
@@ -17,6 +17,7 @@ struct Info {
uint8_t sleepRequest;
uint16_t connectionTimeoutMinutes;
std::vector<CaptureInfo> captures;
uint8_t vinAvailable;
};
// The response for Command::WiVICommand
@@ -27,6 +28,7 @@ public:
std::optional<Command> responseTo;
std::optional<int32_t> value;
std::optional<Info> info;
std::optional<std::string> vin;
};
} // namespace WiVI
@@ -56,6 +56,7 @@ enum class Command : uint16_t {
GetSignal = 0x0013,
Result = 0x0014,
GetPhysicalSignal = 0x0015,
GetVIN = 0x0016,
};
enum class SignalType : uint16_t { // enumCoreMiniValueMiscValueType
@@ -66,6 +67,7 @@ enum class SignalType : uint16_t { // enumCoreMiniValueMiscValueType
ConnectionTimeout = 0x006e,
TimeSinceLastMessageMs = 0x006f,
UploadsPending = 0x0077,
VINEnabled = 0x007D,
};
struct Upload {
@@ -125,7 +127,7 @@ struct CommandPacket {
CoreMiniFixedPointValue value;
};
struct GetAll {
struct GetAllHeader {
static std::vector<uint8_t> Encode();
Header header;
@@ -133,7 +135,6 @@ struct CommandPacket {
uint8_t sleepRequest;
uint16_t connectionTimeoutMinutes;
uint16_t numCaptureInfos;
CaptureInfo captureInfos[0];
};
struct ClearUploads {
@@ -142,6 +143,13 @@ struct CommandPacket {
Header header;
uint8_t bitmask[0];
};
struct GetVIN {
static std::vector<uint8_t> Encode();
Header header;
char VIN[17];
};
};
} // namespace WiVI