Skip to content

Commit

Permalink
Emit last_heartbeat_set as ISO string
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 26, 2024
1 parent decebe1 commit 7450933
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/lvmecp/actor/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import click

from lvmecp.tools import timestamp_to_iso

from . import parser


Expand Down Expand Up @@ -46,6 +48,6 @@ async def status(command: ECPCommand, no_registers: bool = False):
o2_percent_spectrograph=plc.safety.o2_level_spectrograph,
)

command.info(last_heartbeat_set=command.actor._last_heartbeat)
command.info(last_heartbeat_set=timestamp_to_iso(command.actor._last_heartbeat))

return command.finish()
2 changes: 1 addition & 1 deletion python/lvmecp/etc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"o2_percent_utilities": { "type": "number" },
"o2_percent_spectrograph": { "type": "number" },
"last_heartbeat_set": {
"oneOf": [{ "type": "number" }, { "type": "null" }]
"oneOf": [{ "type": "string" }, { "type": "null" }]
},
"engineering_mode": {
"type": "object",
Expand Down

0 comments on commit 7450933

Please sign in to comment.