Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
no_command.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 #include "command_base.h"
5 
6 namespace logic {
7 
9 class NoCommand : public CommandBase {
10 public:
11  inline constexpr NoCommand()
12  : CommandBase() {}
13 
15  bool Reset(uint8_t /*param*/) override { return true; }
16 
18  bool StepInner() override { return true; }
19 
23  inline void SetInitError(ErrorCode ec) { error = ec; }
24 };
25 
27 extern NoCommand noCommand;
28 
29 } // namespace logic
Base class defining common API for high-level operations/commands/state machines.
Definition: command_base.h:29
ErrorCode error
current error code
Definition: command_base.h:137
A dummy No-command operation just to make the init of the firmware consistent (and cleaner code durin...
Definition: no_command.h:9
void SetInitError(ErrorCode ec)
Definition: no_command.h:23
bool StepInner() override
Definition: no_command.h:18
bool Reset(uint8_t) override
Restart the automaton.
Definition: no_command.h:15
ErrorCode
Definition: error_codes.h:17
The logic namespace handles the application logic on top of the modules.
Definition: application.h:8
NoCommand noCommand
The one and only instance of NoCommand state machine in the FW.
Definition: no_command.cpp:6