Skip to content

Commit

Permalink
add a few more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
d-perl committed Dec 4, 2024
1 parent 0bad2b0 commit c6059ad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rtc6_fastcs/bindings/rtc6_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,14 @@ PYBIND11_MODULE(rtc6_bindings, m)
m.def("get_input_pointer", &get_input_pointer, "get the pointer of list input");
m.def("config_list_memory", &config_list, "set the memory for each position list, see p330", py::arg("list_1_mem"), py::arg("list_2_mem"));
m.def("load_list", &load_list, "set the pointer to load at position of list_no, see p330", py::arg("list_no"), py::arg("position"));
m.def("set_end_of_list", &set_end_of_list, "set the end of the list to be at the current pointer position");

// simple control commands
m.def("set_mark_speed_ctrl", &set_mark_speed_ctrl, "set the speed for marks", py::arg("speed"));
m.def("set_jump_speed_ctrl", &set_jump_speed_ctrl, "set the speed for jumps", py::arg("speed"));
m.def("set_sky_writing_mode", &set_sky_writing_mode, "set the skywriting mode", py::arg("speed"));
m.def("set_scanner_delays", &set_scanner_delays_ctrl, "set the scanner delays, in 10us increments", py::arg("jump"), py::arg("mark"), py::arg("polygon"));
m.def("execute_list", &execute_list, "execute the current list");

m.def("get_io_status", &get_io_status, "---");
m.def("get_list_space", &get_list_space, "---");
Expand Down
12 changes: 12 additions & 0 deletions src/rtc6_fastcs/bindings/rtc6_bindings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ __all__ = [
"close",
"config_list_memory",
"connect",
"execute_list",
"get_card_info",
"get_config_list",
"get_error",
Expand All @@ -36,6 +37,7 @@ __all__ = [
"ip_int_to_str",
"ip_str_to_int",
"load_list",
"set_end_of_list",
"set_jump_speed_ctrl",
"set_laser_control",
"set_laser_mode",
Expand Down Expand Up @@ -194,6 +196,11 @@ def connect(ip_string: str, program_file_path: str, correction_file_path: str) -
connect to the eth-box at the given IP
"""

def execute_list(arg0: int) -> None:
"""
execute the current list
"""

def get_card_info() -> CardInfo:
"""
get info for the connected card; throws RtcConnectionError on failure
Expand Down Expand Up @@ -269,6 +276,11 @@ def load_list(list_no: int, position: int) -> int:
set the pointer to load at position of list_no, see p330
"""

def set_end_of_list() -> None:
"""
set the end of the list to be at the current pointer position
"""

def set_jump_speed_ctrl(speed: float) -> None:
"""
set the speed for jumps
Expand Down
5 changes: 5 additions & 0 deletions src/rtc6_fastcs/controller/rtc_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ async def update(self, controller: "RtcControlSettings", attr: AttrR): ...
allowed_values=[rtc6.LaserMode(i).name for i in range(7)],
handler=ControlSettingsHandler(rtc6.set_laser_mode),
)
laser_control = AttrW(
Int(),
group="LaserControl",
handler=ControlSettingsHandler(rtc6.set_laser_control),
)
jump_speed = AttrW(
Float(),
group="LaserControl",
Expand Down

0 comments on commit c6059ad

Please sign in to comment.