Skip to content

Commit

Permalink
update python and cpp to include set_laser_delays
Browse files Browse the repository at this point in the history
  • Loading branch information
co2e14 committed Jan 6, 2025
1 parent 342d9c0 commit 6249709
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rtc6_fastcs/bindings/rtc6_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ PYBIND11_MODULE(rtc6_bindings, m)
// Taken directly from the library, might need to be updated with better typing, enums etc.
m.def("get_last_error", &get_last_error, "get the last error for an ethernet command");
m.def("set_laser_mode", &set_laser_mode_by_enum_string, "set the mode of the laser, see p645", py::arg("mode"));
m.def("set_laser_delays", &set_laser_delays, "set the delays for the laser, see p136", py::arg("laser_on_delay"), py::arg("laser_off_delay"));
m.def("set_laser_control", &set_laser_control, "set the control settings of the laser, see p641", py::arg("settings"));
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"));
Expand Down
13 changes: 13 additions & 0 deletions src/rtc6_fastcs/bindings/rtc6_bindings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ __all__ = [
"set_mark_speed_ctrl",
"set_scanner_delays",
"set_sky_writing_mode",
"set_laser_delays",
]

class CardInfo:
Expand Down Expand Up @@ -297,3 +298,15 @@ def set_sky_writing_mode(speed: int) -> None:
"""
set the skywriting mode
"""

def set_laser_delays(laser_on_delay: int, laser_off_delay: int) -> None:
"""
LaserOn delay. As a signed 32-bit value.
1 bit equals 1/64 μs.
Allowed value range: [–231…+(221–1)].
Values over (221–1) are clipped.
LaserOff delay. As an unsigned 32-bit value.
1 bit equals 1/64 μs.
Allowed value range: [0…+(221–1)].
Values over (221–1) are clipped.
"""

0 comments on commit 6249709

Please sign in to comment.