mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-11 08:22:52 +00:00
Update Disable_Function_Req response
This commit is contained in:
@@ -85,17 +85,20 @@ void CDChanger::handle(const Frame &in, Frame &out) {
|
|||||||
out.reaction = r_StatusReport;
|
out.reaction = r_StatusReport;
|
||||||
break;
|
break;
|
||||||
case Disable_Function_Req:
|
case Disable_Function_Req:
|
||||||
// No change/response needed if we're already not playing
|
// Head unit always expects a response, but the state change can be
|
||||||
if (isPlaying()) {
|
// conditional
|
||||||
stopPlaying();
|
out.is_unicast = true;
|
||||||
out.length = sizeof(function_change_resp);
|
out.length = sizeof(function_change_resp);
|
||||||
memcpy(out.data, function_change_resp, sizeof(function_change_resp));
|
memcpy(out.data, function_change_resp, sizeof(function_change_resp));
|
||||||
|
out.data[2] = to_underlying(from);
|
||||||
out.data[3] = to_underlying(Disable_Function_Resp);
|
out.data[3] = to_underlying(Disable_Function_Resp);
|
||||||
|
if (isPlaying()) {
|
||||||
|
stopPlaying();
|
||||||
state = 0;
|
state = 0;
|
||||||
flags2 = 0x80;
|
flags2 = 0x80;
|
||||||
out.is_unicast = true;
|
|
||||||
out.reaction = r_StatusReport;
|
out.reaction = r_StatusReport;
|
||||||
}
|
} else
|
||||||
|
out.reaction = r_SendOnly;
|
||||||
break;
|
break;
|
||||||
case Eject: {
|
case Eject: {
|
||||||
// "Eject" label is multiply wrong; proper meaning unclear:
|
// "Eject" label is multiply wrong; proper meaning unclear:
|
||||||
|
|||||||
Reference in New Issue
Block a user