nova-control-node 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
@@ -94,12 +94,13 @@ Controls how servo movements are executed when `withinMS` is specified on a move
94
94
 
95
95
  ```typescript
96
96
  interface NovaController {
97
- home ():Promise<void>
98
- shiftHeadTo (Degrees:number):Promise<void>
99
- rollHeadTo (Degrees:number):Promise<void>
100
- pitchHeadTo (Degrees:number):Promise<void>
101
- liftHeadTo (Degrees:number):Promise<void>
102
- rotateBodyTo (Degrees:number):Promise<void>
97
+ home (withinMS?:number):Promise<void>
98
+ shiftHeadTo (Angle:number, withinMS?:number):Promise<void>
99
+ rollHeadTo (Angle:number, withinMS?:number):Promise<void>
100
+ pitchHeadTo (Angle:number, withinMS?:number):Promise<void>
101
+ liftHeadTo (Angle:number, withinMS?:number):Promise<void>
102
+ rotateBodyTo (Angle:number, withinMS?:number):Promise<void>
103
+ moveTo (Target:ServoUpdate, withinMS?:number):Promise<void>
103
104
  get State ():ServoState
104
105
  set State (Update:ServoUpdate)
105
106
  sendServoState ():Promise<void>
@@ -109,12 +110,12 @@ interface NovaController {
109
110
 
110
111
  | method / property | description |
111
112
  | --- | --- |
112
- | `home()` | sends all servos to `HomePosition` |
113
- | `shiftHeadTo(Degrees)` | sets s1 — head forward `> 90°`, back `< 90°` |
114
- | `rollHeadTo(Degrees)` | sets s2 — head clockwise `> 90°`, counter-clockwise `< 90°` |
115
- | `pitchHeadTo(Degrees)` | sets s3 — head up `> 110°`, down toward `40°` |
116
- | `liftHeadTo(Degrees)` | sets s5 — secondary head up/down, range `20°`–`150°` |
117
- | `rotateBodyTo(Degrees)` | sets s4 — rotates the entire body around the Z-axis |
113
+ | `home(withinMS?)` | sends all servos to `HomePosition` |
114
+ | `shiftHeadTo(Angle, withinMS?)` | sets s1 — head forward `> 90°`, back `< 90°` |
115
+ | `rollHeadTo(Angle, withinMS?)` | sets s2 — head clockwise `> 90°`, counter-clockwise `< 90°` |
116
+ | `pitchHeadTo(Angle, withinMS?)` | sets s3 — head up `> 110°`, down toward `40°` |
117
+ | `liftHeadTo(Angle, withinMS?)` | sets s5 — secondary head up/down, range `20°`–`150°` |
118
+ | `rotateBodyTo(Angle, withinMS?)` | sets s4 — rotates the entire body around the Z-axis |
118
119
  | `moveTo(Target, withinMS?)` | moves the servos listed in `Target` to their target angles; with `withinMS`, uses the trapezoidal profile |
119
120
  | `State` (get) | returns a deep copy of the pending state if any, else the last-sent state |
120
121
  | `State` (set) | replaces any pending entry with `Update` merged onto the *last-sent* state (not onto pending); flush with `sendServoState()` |
@@ -140,12 +141,12 @@ Supported commands:
140
141
  | command | description |
141
142
  | --- | --- |
142
143
  | `home [<within_ms>]` | send all servos to home positions |
143
- | `shift-to <deg> [<within_ms>]` | s1 — head forward / back |
144
- | `roll-to <deg> [<within_ms>]` | s2 — head CW / CCW |
145
- | `pitch-to <deg> [<within_ms>]` | s3 — head up / down |
146
- | `rotate-to <deg> [<within_ms>]` | s4 — body Z-axis rotation |
147
- | `lift-to <deg> [<within_ms>]` | s5 — secondary head axis |
148
- | `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`) |
144
+ | `shift-to <angle> [<within_ms>]` | s1 — head forward / back |
145
+ | `roll-to <angle> [<within_ms>]` | s2 — head CW / CCW |
146
+ | `pitch-to <angle> [<within_ms>]` | s3 — head up / down |
147
+ | `rotate-to <angle> [<within_ms>]` | s4 — body Z-axis rotation |
148
+ | `lift-to <angle> [<within_ms>]` | s5 — secondary head axis |
149
+ | `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`) |
149
150
  | `wait <ms>` | pause for the given number of milliseconds |
150
151
 
151
152
  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-node",
3
3
  "description": "Control a NOVA DIY Artificial Intelligence Robot by Creoqode from Node.js",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "nova",