nova-control-browser 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -89,12 +89,13 @@ Controls how servo movements are executed when `withinMS` is specified on a move
89
89
 
90
90
  ```typescript
91
91
  interface NovaController {
92
- home ():Promise<void>
93
- shiftHeadTo (Degrees:number):Promise<void>
94
- rollHeadTo (Degrees:number):Promise<void>
95
- pitchHeadTo (Degrees:number):Promise<void>
96
- liftHeadTo (Degrees:number):Promise<void>
97
- rotateBodyTo (Degrees:number):Promise<void>
92
+ home (withinMS?:number):Promise<void>
93
+ shiftHeadTo (Angle:number, withinMS?:number):Promise<void>
94
+ rollHeadTo (Angle:number, withinMS?:number):Promise<void>
95
+ pitchHeadTo (Angle:number, withinMS?:number):Promise<void>
96
+ liftHeadTo (Angle:number, withinMS?:number):Promise<void>
97
+ rotateBodyTo (Angle:number, withinMS?:number):Promise<void>
98
+ moveTo (Target:ServoUpdate, withinMS?:number):Promise<void>
98
99
  get State ():ServoState
99
100
  set State (Update:ServoUpdate)
100
101
  sendServoState ():Promise<void>
@@ -104,12 +105,12 @@ interface NovaController {
104
105
 
105
106
  | method / property | description |
106
107
  | --- | --- |
107
- | `home()` | sends all servos to `HomePosition` |
108
- | `shiftHeadTo(Degrees)` | sets s1 — head forward `> 90°`, back `< 90°` |
109
- | `rollHeadTo(Degrees)` | sets s2 — head clockwise `> 90°`, counter-clockwise `< 90°` |
110
- | `pitchHeadTo(Degrees)` | sets s3 — head up `> 110°`, down toward `40°` |
111
- | `liftHeadTo(Degrees)` | sets s5 — secondary head up/down, range `20°`–`150°` |
112
- | `rotateBodyTo(Degrees)` | sets s4 — rotates the entire body around the Z-axis |
108
+ | `home(withinMS?)` | sends all servos to `HomePosition` |
109
+ | `shiftHeadTo(Angle, withinMS?)` | sets s1 — head forward `> 90°`, back `< 90°` |
110
+ | `rollHeadTo(Angle, withinMS?)` | sets s2 — head clockwise `> 90°`, counter-clockwise `< 90°` |
111
+ | `pitchHeadTo(Angle, withinMS?)` | sets s3 — head up `> 110°`, down toward `40°` |
112
+ | `liftHeadTo(Angle, withinMS?)` | sets s5 — secondary head up/down, range `20°`–`150°` |
113
+ | `rotateBodyTo(Angle, withinMS?)` | sets s4 — rotates the entire body around the Z-axis |
113
114
  | `moveTo(Target, withinMS?)` | moves the servos listed in `Target` to their target angles; with `withinMS`, uses the trapezoidal profile |
114
115
  | `State` (get) | returns a deep copy of the pending state if any, else the last-sent state |
115
116
  | `State` (set) | replaces any pending entry with `Update` merged onto the *last-sent* state (not onto pending); flush with `sendServoState()` |
@@ -135,12 +136,12 @@ Supported commands:
135
136
  | command | description |
136
137
  | --- | --- |
137
138
  | `home [<within_ms>]` | send all servos to home positions |
138
- | `shift-to <deg> [<within_ms>]` | s1 — head forward / back |
139
- | `roll-to <deg> [<within_ms>]` | s2 — head CW / CCW |
140
- | `pitch-to <deg> [<within_ms>]` | s3 — head up / down |
141
- | `rotate-to <deg> [<within_ms>]` | s4 — body Z-axis rotation |
142
- | `lift-to <deg> [<within_ms>]` | s5 — secondary head axis |
143
- | `move [shift-to <deg>] [roll-to <deg>] [pitch-to <deg>] [rotate-to <deg>] [lift-to <deg>] [within-ms <ms>]` | set multiple servos atomically (e.g. `move shift-to 100 rotate-to 120 within-ms 500`) |
139
+ | `shift-to <angle> [<within_ms>]` | s1 — head forward / back |
140
+ | `roll-to <angle> [<within_ms>]` | s2 — head CW / CCW |
141
+ | `pitch-to <angle> [<within_ms>]` | s3 — head up / down |
142
+ | `rotate-to <angle> [<within_ms>]` | s4 — body Z-axis rotation |
143
+ | `lift-to <angle> [<within_ms>]` | s5 — secondary head axis |
144
+ | `move [shift-to <angle>] [roll-to <angle>] [pitch-to <angle>] [rotate-to <angle>] [lift-to <angle>] [within-ms <ms>]` | set multiple servos atomically (e.g. `move shift-to 100 rotate-to 120 within-ms 500`) |
144
145
  | `wait <ms>` | pause for the given number of milliseconds |
145
146
 
146
147
  Each command is fully awaited before the next begins. Throws a descriptive error containing the line number if an unknown command or invalid argument is encountered.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nova-control-browser",
3
3
  "description": "Control a NOVA DIY Artificial Intelligence Robot by Creoqode from a browser",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "nova",