From 4dc28722863bf298ef4548b4194e34598359f9bd Mon Sep 17 00:00:00 2001
From: Peli de Halleux
-
`,
hasCloseIcon: true,
diff --git a/editor/extension.ts b/editor/extension.ts
index 0d55a999..fd2ef320 100644
--- a/editor/extension.ts
+++ b/editor/extension.ts
@@ -5,6 +5,7 @@ import { deployCoreAsync, initAsync, canUseWebSerial, enableWebSerialAsync, setC
let bluetoothDialogShown = false;
pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise
- ${lf("Click Download again to send your code to the EV3 over Bluetooth.")} -
- ` - })) + .then(() => Promise.delay(500)) + .then(() => projectView.compile()) } } } : undefined, downloadAgain ? { diff --git a/fieldeditors/field_speed.ts b/fieldeditors/field_speed.ts index 727928f5..cd095485 100644 --- a/fieldeditors/field_speed.ts +++ b/fieldeditors/field_speed.ts @@ -77,8 +77,6 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust setReadout_(readout: Element, value: string) { let x = parseFloat(value) || 0; - // snap on multiple of 5 - x = Math.round(x / 5) * 5; this.updateSpeed(x); // Update reporter this.reporter.textContent = `${x}%`; diff --git a/libs/gyro-sensor/gyro.ts b/libs/gyro-sensor/gyro.ts index c9cdf25a..fc88bc02 100644 --- a/libs/gyro-sensor/gyro.ts +++ b/libs/gyro-sensor/gyro.ts @@ -179,6 +179,7 @@ namespace sensors { computeDrift() { if (this.calibrating) pauseUntil(() => !this.calibrating, 2000); + pause(1000); // let the robot settle this.computeDriftNoCalibration(); } @@ -192,7 +193,7 @@ namespace sensors { d += this._query(); pause(4); } - this._drift = d / n; + this._drift = Math.round(d / n); } _info(): string { @@ -203,8 +204,8 @@ namespace sensors { case GyroSensorMode.Angle: return `${this._query()}>`; case GyroSensorMode.Rate: - let r = `${this._query()}>/s`; - if (this._drift) + let r = `${this._query()}r`; + if (this._drift != 0) r += `-${this._drift | 0}`; return r; } diff --git a/package.json b/package.json index 7e88c77a..d28ce318 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "pxt-common-packages": "0.23.61", - "pxt-core": "4.0.10" + "pxt-core": "4.0.11" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis"