23
This commit is contained in:
parent
30cbf31276
commit
5275511b20
@ -268,6 +268,21 @@ static void parse_and_dispatch_tlv(TcpStreamCtx_t *ctx, const uint8_t *packet,
|
|||||||
const uint8_t *value = packet + offset + 3;
|
const uint8_t *value = packet + offset + 3;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case TYPE_HEARTBEAT: {
|
||||||
|
/* Server heartbeat response — update activity timestamp */
|
||||||
|
ctx->last_activity_ms = qdx_port_get_tick_ms();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TYPE_ACK_PAYLOAD: {
|
||||||
|
if (len >= 3) {
|
||||||
|
uint16_t ack_seq = qdx_read_u16_le(value);
|
||||||
|
uint8_t status = value[2];
|
||||||
|
uint16_t err_code = (len >= 5) ? qdx_read_u16_le(value + 3) : 0;
|
||||||
|
DBG_LOGIC("<< [%s] ACK: seq=%d status=%d err=0x%04x\r\n",
|
||||||
|
ctx->label, (int)ack_seq, (int)status, (int)err_code);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case TYPE_DEVID_ASSIGN: {
|
case TYPE_DEVID_ASSIGN: {
|
||||||
if (len >= sizeof(DevIDAssignment_t)) {
|
if (len >= sizeof(DevIDAssignment_t)) {
|
||||||
uint16_t new_id = qdx_read_u16_le(value);
|
uint16_t new_id = qdx_read_u16_le(value);
|
||||||
|
|||||||
@ -620,8 +620,8 @@ int main(void)
|
|||||||
{
|
{
|
||||||
Config2D_t test_cfg2d;
|
Config2D_t test_cfg2d;
|
||||||
memset(&test_cfg2d, 0, sizeof(test_cfg2d));
|
memset(&test_cfg2d, 0, sizeof(test_cfg2d));
|
||||||
test_cfg2d.TargetWidth = 64; /* ROI extraction 64x64 */
|
test_cfg2d.TargetWidth = SENSOR_WIDTH; /* Full resolution */
|
||||||
test_cfg2d.TargetHeight = 64;
|
test_cfg2d.TargetHeight = SENSOR_HEIGHT;
|
||||||
test_cfg2d.TriggerRoiX = 0; /* Full-frame trigger area */
|
test_cfg2d.TriggerRoiX = 0; /* Full-frame trigger area */
|
||||||
test_cfg2d.TriggerRoiY = 0;
|
test_cfg2d.TriggerRoiY = 0;
|
||||||
test_cfg2d.TriggerRoiW = SENSOR_WIDTH;
|
test_cfg2d.TriggerRoiW = SENSOR_WIDTH;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user