Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/_Message.zig
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ pub const Request = union(Kind) {
set_gain_speed: SpeedGain,
set_gain_position: PositionGain,
start_log: StartLog,
initialize_slider: InitializeSlider,
set_angle_offset: AngleOffset,
set_section_count: SectionCount,
get_section_count: [0]u8,
Expand Down Expand Up @@ -541,6 +542,16 @@ pub const Request = union(Kind) {
duration: f32 align(1),
};

/// Register a temporary slider on an axis for testing a single driver.
/// The driver forgets it unless the slider is actually on that axis.
pub const InitializeSlider = extern struct {
_reserved: u8 = 0,
/// ID of the slider.
slider_id: u8,
/// Axis number of the slider, 1 to 3.
axis: u8,
};

pub const AngleOffset = extern struct {
pub fn fromConfig(config: Config) AngleOffset {
var result: AngleOffset = undefined;
Expand Down Expand Up @@ -680,6 +691,7 @@ pub const Response = union(Kind) {
set_gain_speed: Ack,
set_gain_position: Ack,
start_log: StartLog,
initialize_slider: Ack,
set_angle_offset: Ack,
set_section_count: Ack,
get_section_count: SectionCount,
Expand Down Expand Up @@ -1365,6 +1377,7 @@ pub const Response = union(Kind) {

pub const Ack = enum(u8) {
success = 0x00,
slider_already_exist = 0x06,
_,
};
};
Expand All @@ -1384,6 +1397,7 @@ pub const Kind = enum(u8) {
set_gain_speed,
set_gain_position,
start_log,
initialize_slider,
set_angle_offset = 0x11,
set_section_count = 0x15,
get_section_count,
Expand Down
Loading