Skip to content

Commit

Permalink
[iec][fuji] talk handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Jun 30, 2023
1 parent 6b27110 commit 5a3f8cd
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/device/iec/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void iecFuji::mount_host()

if (payload[0] == FUJICMD_MOUNT_HOST)
{
hs = payload[1];
hs = payload[1];
}
else
{
Expand Down Expand Up @@ -1517,13 +1517,20 @@ device_state_t iecFuji::process()
device_state = DEVICE_ERROR;
IEC.senderTimeout();
}
else if (commanddata.primary != IEC_UNLISTEN)
return device_state;

if (payload[0] > 0x7F)
process_raw_commands();
else
process_basic_commands();
if (commanddata.primary == IEC_TALK && commanddata.secondary == IEC_REOPEN)
{
char tmp[79];
sprintf(tmp, "%u,\"%s\",%u,%u", iecStatus.error, iecStatus.msg.c_str(), iecStatus.connected, iecStatus.channel);
IEC.sendBytes(string(tmp), true);
}
else if (commanddata.primary == IEC_UNLISTEN)
{
if (payload[0] > 0x7F)
process_raw_commands();
else
process_basic_commands();
}

return device_state;
}
Expand Down

0 comments on commit 5a3f8cd

Please sign in to comment.