Working BLE on S3
This commit is contained in:
+8
-8
@@ -121,12 +121,11 @@
|
||||
|
||||
<!-- ── App bootstrap (ES module entry point) ─────────────────── -->
|
||||
<script type="module">
|
||||
const V = Date.now(); // cache-buster – ensures fresh module load on every page refresh
|
||||
const { default: Router } = await import(`./web/js/router.js?v=${V}`);
|
||||
const { default: BLE } = await import(`./web/js/ble.js?v=${V}`);
|
||||
const { default: UI } = await import(`./web/js/ui.js?v=${V}`);
|
||||
const { default: HomeSection } = await import(`./web/js/sections/home.js?v=${V}`);
|
||||
const { default: StepperSection } = await import(`./web/js/sections/stepper-test.js?v=${V}`);
|
||||
import Router from './web/js/router.js';
|
||||
import BLE from './web/js/ble.js';
|
||||
import UI from './web/js/ui.js';
|
||||
import HomeSection from './web/js/sections/home.js';
|
||||
import StepperSection from './web/js/sections/stepper-test.js';
|
||||
|
||||
// ── Register routes ────────────────────────────────────────────
|
||||
Router.register('home', HomeSection);
|
||||
@@ -177,8 +176,9 @@
|
||||
BLE.disconnect();
|
||||
} else {
|
||||
BLE.connect().catch(e => {
|
||||
if (!e.message?.includes('cancelled') && !e.name?.includes('NotFound')) {
|
||||
UI.log(`Connect error: ${e.message}`, 'error');
|
||||
console.error('[BLE Connect Error]', e);
|
||||
if (!e.message?.includes('cancelled')) {
|
||||
UI.log(`Connect error: ${e.message} (${e.name})`, 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user