use speed when setting power
This commit is contained in:
parent
da8de1e31e
commit
815d438d86
@ -97,7 +97,8 @@ namespace motors {
|
|||||||
power(power: number) {
|
power(power: number) {
|
||||||
power = Math.clamp(-100, 100, power >> 0);
|
power = Math.clamp(-100, 100, power >> 0);
|
||||||
|
|
||||||
const b = mkCmd(this.port, DAL.opOutputPower, 1)
|
// per LEGO: call it power, use speed
|
||||||
|
const b = mkCmd(this.port, DAL.opOutputSpeed, 1)
|
||||||
b.setNumber(NumberFormat.Int8LE, 2, power)
|
b.setNumber(NumberFormat.Int8LE, 2, power)
|
||||||
writePWM(b)
|
writePWM(b)
|
||||||
if (power) {
|
if (power) {
|
||||||
|
Loading…
Reference in New Issue
Block a user