Add filament sensor status reporting from printer into MMU

pull/122/head
D.R.racer 2021-09-16 10:36:50 +02:00 committed by DRracer
parent e59e7e3884
commit dc3f5764a6
2 changed files with 6 additions and 4 deletions

View File

@ -313,9 +313,10 @@ void ProcessRequestMsg(const mp::RequestMsg &rq) {
case mp::RequestMsgCodes::Unload:
PlanCommand(rq);
break;
// case mp::RequestMsgCodes::SetVar: //@@TODO - this is where e.g. printer's fsensor gets updated
// SetVar(rq);
// break;
case mp::RequestMsgCodes::FilamentSensor: // set filament sensor state in the printer
mfs::fsensor.ProcessMessage(rq.value != 0);
ReportCommandAccepted(rq, mp::ResponseMsgParamCodes::Accepted);
break;
default:
// respond with an error message
break;

View File

@ -23,7 +23,8 @@ enum class RequestMsgCodes : uint8_t {
Button = 'B',
Eject = 'E',
Wait = 'W',
Cut = 'K'
Cut = 'K',
FilamentSensor = 'F'
};
/// Definition of response message parameter codes