2024-04-22 15:47:25 +02:00
|
|
|
import struct
|
|
|
|
from serde import Model, fields
|
|
|
|
|
2024-04-24 20:15:32 +02:00
|
|
|
from common import EXPERIMENT_APID, UniqueId, make_unique_id
|
|
|
|
|
2024-04-22 15:47:25 +02:00
|
|
|
|
|
|
|
class CameraParameters(Model):
|
|
|
|
R: fields.Int()
|
|
|
|
G: fields.Int()
|
|
|
|
B: fields.Int()
|
|
|
|
N: fields.Int()
|
|
|
|
P: fields.Bool()
|
|
|
|
E: fields.Int()
|
|
|
|
W: fields.Int()
|
|
|
|
|
|
|
|
def serialize_for_uplink(self) -> bytearray:
|
2024-04-24 20:15:32 +02:00
|
|
|
return self.to_json().encode("utf-8")
|