13 "power",
"caps",
"kana",
"pause",
"turbo",
"FDD" 23 , msxCliComm(msxCliComm_)
24 , interp(commandController.getInterpreter())
29 std::string name = getLedName(static_cast<Led>(i));
30 ledStatus[i] = std::make_unique<ReadOnlySetting>(
31 commandController,
"led_" + name,
32 "Current status for LED: " + name,
41 if (ledValue[led] == status)
return;
42 ledValue[led] = status;
49 auto diff = now - lastTime;
62 void LedStatus::handleEvent(
Led led) noexcept
64 std::string_view str = ledValue[led] ?
"on":
"off";
65 ledStatus[led]->setReadOnlyValue(
TclObject(str));
69 void LedStatus::executeRT()
72 if (ledValue[i] != ledStatus[i]->getValue().getBoolean(interp)) {
73 handleEvent(static_cast<Led>(i));
LedStatus(RTScheduler &rtScheduler, CommandController &commandController, MSXCliComm &msxCliComm)
Thanks to enen for testing this on a real cartridge:
void update(UpdateType type, std::string_view name, std::string_view value) override
void scheduleRT(uint64_t delta)
void setLed(Led led, bool status)
uint64_t getTime()
Get current (real) time in us.