mirror of
https://github.com/esphome/esphome.git
synced 2025-08-05 18:07:47 +00:00
tweak
This commit is contained in:
parent
42be5d892a
commit
e472a345c9
@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <cassert>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -46,10 +45,7 @@ struct PacketInfo {
|
|||||||
uint32_t message_type : 8; // 8 bits: 0-255
|
uint32_t message_type : 8; // 8 bits: 0-255
|
||||||
// Total: 32 bits = 4 bytes exactly
|
// Total: 32 bits = 4 bytes exactly
|
||||||
|
|
||||||
PacketInfo(uint8_t type, uint16_t off, uint16_t size) : offset(off), payload_size(size), message_type(type) {
|
PacketInfo(uint8_t type, uint16_t off, uint16_t size) : offset(off), payload_size(size), message_type(type) {}
|
||||||
assert(off <= MAX_OFFSET);
|
|
||||||
assert(size <= MAX_PAYLOAD_SIZE);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class APIError : uint16_t {
|
enum class APIError : uint16_t {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user