| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- syntax = "proto3";
- import "nanopb.proto";
- package PB;
- /*
- * Message FROM the SmartKnob to USB host
- */
- message FromSmartKnob {
- oneof payload {
- Ack ack = 1;
- Log log = 2;
- SmartKnobState smartknob_state = 3;
- }
- }
- message Ack {
- uint32 nonce = 1;
- }
- message Log {
- string msg = 1 [(nanopb).max_length = 255];
- }
- message SmartKnobState {
- int32 current_position = 1;
- float sub_position_unit = 2;
- SmartKnobConfig config = 3;
- }
- /*
- * Message TO the Smartknob from the USB host
- */
- message ToSmartknob {
- uint32 nonce = 1;
- oneof payload {
- RequestState request_state = 2;
- SmartKnobConfig smartknob_config = 3;
- }
- }
- message SmartKnobConfig {
- int32 num_positions = 1;
- int32 position = 2;
- float position_width_radians = 3;
- float detent_strength_unit = 4;
- float endstop_strength_unit = 5;
- float snap_point = 6;
- string text = 7 [(nanopb).max_length = 50];
- }
- message RequestState {}
|