Skip to content

Commit

Permalink
adding more scope controlls
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronDevine committed Oct 2, 2024
1 parent 5239f96 commit fb02856
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions TEM_comms/scope.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from pigeon import BaseMessage
from typing import Literal
from typing import Literal, Optional, Tuple
from pydantic import model_validator


class Command(BaseMessage):
focus: int | None = None
mag_mode: Literal["LM", "MAG1", "MAG2"] | None = None
mag: int | None = None
focus: Optional[int] = None
mag_mode: Optional[Literal["LM", "MAG1", "MAG2"]] = None
mag: Optional[int] = None
brightness: Optional[int] = None
beam_offset: Optional[Tuple[int, int]] = None
screen: Optional[Literal["up", "down"]] = None

@model_validator(mode="after")
def check_mag(self):
Expand All @@ -20,3 +23,5 @@ class Status(BaseMessage):
mag_mode: str
mag: int
tank_voltage: int
brightness: int
beam_offset: Tuple[int, int]

0 comments on commit fb02856

Please sign in to comment.