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AC5D,G","sources":["webpack://WebComponents/./runestone/cellbotics/js/auto-bind.js","webpack://WebComponents/./runestone/cellbotics/js/ble.js"],"sourcesContent":["// .. Copyright (C) 2012-2020 Bryan A. Jones.\n//\n// This file is part of the CellBotics system.\n//\n// The CellBotics system is free software: you can redistribute it and/or\n// modify it under the terms of the GNU General Public License as\n// published by the Free Software Foundation, either version 3 of the\n// License, or (at your option) any later version.\n//\n// The CellBotics system is distributed in the hope that it will be\n// useful, but WITHOUT ANY WARRANTY; without even the implied warranty\n// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with the CellBotics system. If not, see\n// .\n//\n// *********************************************************\n// |docname| - Automatically bind methods to their instances\n// *********************************************************\n\n\"use strict\";\n\n\n// The following two functions were taken from https://github.com/sindresorhus/auto-bind/blob/master/index.js and lightly modified. They provide an easy way to bind all callable methods to their instance. See `Binding Methods to Class Instance Objects `_ for more discussion on this crazy JavaScript necessity.\n//\n// Gets all non-builtin properties up the prototype chain\nconst getAllProperties = object => {\n\tconst properties = new Set();\n\n\tdo {\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tproperties.add([object, key]);\n\t\t}\n\t} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);\n\n\treturn properties;\n};\n\n\n// Invoke this in the constructor of an object.\nexport function auto_bind(self) {\n for (const [object, key] of getAllProperties(self.constructor.prototype)) {\n if (key === 'constructor') {\n continue;\n }\n\n const descriptor = Reflect.getOwnPropertyDescriptor(object, key);\n if (descriptor && typeof descriptor.value === 'function') {\n self[key] = self[key].bind(self);\n }\n }\n}\n","// .. Copyright (C) 2012-2020 Bryan A. Jones.\n//\n// This file is part of the CellBotics system.\n//\n// The CellBotics system is free software: you can redistribute it and/or\n// modify it under the terms of the GNU General Public License as\n// published by the Free Software Foundation, either version 3 of the\n// License, or (at your option) any later version.\n//\n// The CellBotics system is distributed in the hope that it will be\n// useful, but WITHOUT ANY WARRANTY; without even the implied warranty\n// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with the CellBotics system. If not, see\n// .\n//\n// *************************************************************\n// |docname| - JavaScript code to connect with a CellBot via BLE\n// *************************************************************\n\n\"use strict\";\n\nimport { auto_bind } from \"./auto-bind.js\";\n\n// CellBotBle\n// ==========\n// This sends and receives data to the CellBot via Bluetooth.\nclass CellBotBle {\n constructor() {\n auto_bind(this);\n\n this.clear_connection();\n // If true, the server (BLE device / CellBot) is little-endian; if false, big-endian.\n this.is_little_endian = true;\n // If true, expect verbose returns (the CellBot was compiled with ``VERBOSE_RETURN`` defined).\n this.verbose_return = true;\n // If true, return dummy values instead of talking to the hardware.\n this.is_sim = false;\n\n // #defines from Arduino headers.\n this.INPUT = 1;\n this.OUTPUT = 2;\n\n // UUIDs for each characteristic.\n this.uuid = {\n resetHardware: \"60cb180e-838d-4f65-aff4-20b609b453f3\",\n pinMode: \"6ea6d9b6-7b7e-451c-ab45-221298e43562\",\n digitalWrite: \"d3423cf6-6da7-4dd8-a5ba-3c980c74bd6d\",\n digitalRead: \"c370bc79-11c1-4530-9f69-ab9d961aa497\",\n ledcSetup: \"6be57cea-3c46-4687-972b-03429d2acf9b\",\n ledcAttachPin: \"2cd63861-078f-436f-9ed9-79e57ec8b638\",\n ledcDetachPin: \"b9b0cabe-25d8-4965-9259-7d3b6330e940\",\n ledcWrite: \"40698030-a343-448f-a9ea-54b39b03bf81\"\n };\n }\n\n // Clear Bluetooth connection-related objects.\n clear_connection() {\n this.server && this.server.disconnect();\n this.server = undefined;\n this.service = undefined;\n // A dict of name: ``BluetoothRemoteGATTCharacteristic``.\n this.characteristic = {};\n }\n\n // Return true if BLE is supported by this browser. Even if it is supported, it may not be available.\n is_ble_supported() {\n return Boolean(navigator.bluetooth);\n }\n\n // Return true is BLE is supported. If so, register the provided event handler.\n async has_ble(on_availability_changed) {\n if (this.is_sim) {\n return true;\n }\n\n if (this.is_ble_supported() && await navigator.bluetooth.getAvailability()) {\n navigator.bluetooth.addEventListener(\"availabilitychanged\", on_availability_changed);\n return true;\n } else {\n return false;\n }\n }\n\n // Returns true if the Bluetooth device (server) is connected.\n paired() {\n return this.is_sim || (this.server && this.server.connected);\n }\n\n // Pair with a CellBot and return the characteristic used to control the device.\n async pair(disconnect_callback)\n {\n if (this.is_sim) {\n return;\n }\n\n // Skip connecting if we're already connected.\n if (this.paired()) {\n return;\n }\n\n // Shut down any remnants of a previous connection.\n this.clear_connection();\n\n // Request a device with service `UUIDs`. See the `Bluetooth API `_.\n let cellBot_service = \"6c533793-9bd6-47d6-8d3b-c10a704b6b97\";\n this.device = await navigator.bluetooth.requestDevice({\n filters: [{\n services: [cellBot_service]\n }]\n });\n\n // Notify on a disconnect. I can't find any docs on this, but it does work.\n this.device.addEventListener('gattserverdisconnected', disconnect_callback);\n this.device.addEventListener('gattserverdisconnected', this.clear_connection);\n\n // Connect to its server.\n this.server = await this.device.gatt.connect();\n\n // Get the service for our server.\n this.service = await this.server.getPrimaryService(cellBot_service);\n }\n\n // Generic access function for calling a function on the Arduino. It returns (value returned after invoking the function, message).\n async invoke_Arduino(\n // The Bluetooth characteristic to use for this call.\n characteristic,\n // The number of bytes in the return value:\n //\n // - 0: void\n // - +1/-1: unsigned/signed 8-bit value\n // - +2/-2: unsigned/signed 16-bit value\n // - +4/-4: unsigned/signed 32-bit value\n // - 0.4/0.8: 32-bit/64-bit float\n return_bytes,\n // An ArrayBuffer or compatible type of data containing encoded parameters to send.\n param_array\n ) {\n if (this.is_sim) {\n return [0, \"\"];\n }\n\n await characteristic.writeValue(param_array);\n // Read the returned data.\n let return_data = await characteristic.readValue();\n // Interpret the return value.\n let return_value;\n switch (return_bytes) {\n case 0:\n return_value = undefined;\n break;\n\n case 1:\n return_value = return_data.getUint8(0);\n break;\n\n case -1:\n return_value = return_data.getInt8(0);\n break;\n\n case 2:\n return_value = return_data.getUint16(0);\n break;\n\n case -2:\n return_value = return_data.getInt16(0, this.is_little_endian);\n break;\n\n case 4:\n return_value = return_data.getUint32(0, this.is_little_endian);\n break;\n\n case -4:\n return_value = return_data.getInt32(0, this.is_little_endian);\n break;\n\n case 0.4:\n return_value = return_data.getFloat32(0, this.is_little_endian);\n return_bytes = 4;\n break;\n\n case 0.8:\n return_value = return_data.getFloat64(0, this.is_little_endian);\n return_bytes = 8;\n break;\n\n }\n\n let message = return_data.buffer.slice(return_bytes);\n message = String.fromCharCode.apply(null, new Uint8Array(message));\n if (!this.verbose_return) {\n throw `BLE protocol error: ${message}`\n }\n return [return_value, message];\n }\n\n // Return an existing instance of a ``BluetoothRemoteGATTCharacteristic`` or create a new one.\n async get_characteristic(name) {\n if (this.is_sim) {\n return name;\n }\n\n if (name in this.characteristic) {\n return this.characteristic[name];\n }\n return this.characteristic[name] = await this.service.getCharacteristic(this.uuid[name]);\n }\n\n // Reset the hardware on the connected device.\n async resetHardware() {\n // Any write is fine -- just send 1 byte.\n return this.invoke_Arduino(await this.get_characteristic(\"resetHardware\"), 0, new Uint8Array([1]));\n }\n\n // Invoke `pinMode `_ on the Arduino.\n async pinMode(u8_pin, u8_mode) {\n return this.invoke_Arduino(await this.get_characteristic(\"pinMode\"), 0, new Uint8Array([u8_pin, u8_mode]));\n }\n\n // Invoke `digitalWrite `_ on the Arduino.\n async digitalWrite(u8_pin, u8_value) {\n return this.invoke_Arduino(await this.get_characteristic(\"digitalWrite\"), 0, new Uint8Array([u8_pin, u8_value]));\n }\n\n // Invoke `digitalRead `_ on the Arduino.\n async digitalRead(u8_pin) {\n return this.invoke_Arduino(await this.get_characteristic(\"digitalRead\"), 1, new Uint8Array([u8_pin]));\n }\n\n // Invoke ``ledcSetup`` on the Arduino.\n //\n // Note that the LEDC control on the ESP32 Arduino port isn't documented. Here's my attempts. The best reference is the `LED_PWM chapter of the ESP32 Technical Reference Manual `_. To set up PWM, you need to select:\n //\n // - A channel (channels 0-7 auto-update new PWM periods, channels 8-15 don't).\n // - The frequency to do the PWM, in Hz.\n // - A number of bits used to do the PWM. The maximum possible value is floor(log2(processor clock frequency/PWM frequency)); this cannot exceed 20. The processor clock frequency is either 80 MHz or 1 MHz.\n //\n // The function returns the actual PWM frequency, due to the limitations of the available clock divisor.\n async ledcSetup(u8_channel, d_freq, u8_resolution_bits) {\n let param_array = new ArrayBuffer(11);\n let dv = new DataView(param_array);\n dv.setUint8(0, u8_channel);\n dv.setFloat64(1, d_freq, this.is_little_endian);\n dv.setUint8(10, u8_resolution_bits);\n return this.invoke_Arduino(await this.get_characteristic(\"ledcSetup\"), 0.8, param_array);\n }\n\n // Invoke ``ledcAttachPin`` on the Arduino.\n //\n // Next, attach this channel to a specific pin on the Arduino.\n async ledcAttachPin(u8_pin, u8_channel) {\n return this.invoke_Arduino(await this.get_characteristic(\"ledcAttachPin\"), 0, new Uint8Array([u8_pin, u8_channel]));\n }\n\n // Invoke ``ledcWrite`` on the Arduino.\n //\n // Finally, select a duty cycle for that channel, from 2^num_bits to 1.\n async ledcWrite(u8_channel, u32_duty) {\n let param_array = new ArrayBuffer(5);\n let dv = new DataView(param_array);\n dv.setUint8(0, u8_channel);\n dv.setUint32(1, u32_duty, this.is_little_endian);\n return this.invoke_Arduino(await this.get_characteristic(\"ledcWrite\"), 0, param_array);\n }\n\n // Invoke ``ledcDetachPin`` on the Arduino.\n //\n // Next, attach this channel to a specific pin on the Arduino.\n async ledcDetachPin(u8_pin) {\n return this.invoke_Arduino(await this.get_characteristic(\"ledcDetachPin\"), 0, new Uint8Array([u8_pin]));\n }\n}\n\n\n// CellBotBleGui\n// =============\n// Provide a simple pair/disconnect GUI for the CellBot Bluetooth connection.\nclass CellBotBleGui {\n constructor(pair_button_id, pair_status_id) {\n auto_bind(this);\n\n this.ble_pair_button = document.getElementById(pair_button_id);\n this.ble_pair_status = document.getElementById(pair_status_id);\n\n // If the GUI isn't available, give up.\n if (!this.ble_pair_button || !this.ble_pair_status) {\n return;\n }\n\n this.cell_bot_ble = new CellBotBle();\n // Update the pair button based on BLE availability.\n this.cell_bot_ble.has_ble(this.on_availability_changed).then(this.on_ble_available);\n // Respond to button clicks.\n this.ble_pair_button.addEventListener(\"click\", event => {\n this.async_on_pair_clicked();\n })\n }\n\n async async_on_pair_clicked() {\n if (!this.cell_bot_ble.paired()) {\n this.ble_pair_button.disabled = true;\n this.ble_pair_status.innerHTML = \"Pairing...\";\n try {\n await this.cell_bot_ble.pair(this.on_disconnect);\n this.ble_pair_status.innerHTML = `Paired to ${this.cell_bot_ble.device.name}.`;\n this.ble_pair_button.innerHTML = \"Disconnect\";\n\n } catch (err) {\n this.ble_pair_status.innerHTML = \"Unable to pair.\";\n throw err;\n } finally {\n this.ble_pair_button.disabled = false;\n }\n\n } else {\n this.cell_bot_ble.server.disconnect();\n }\n }\n\n on_availability_changed(event) {\n // TODO: I don't know what the structure of this event is.\n console.log(event);\n }\n\n on_ble_available(has_ble) {\n this.ble_pair_button.disabled = !has_ble;\n if (has_ble) {\n this.ble_pair_status.innerHTML = \"Not connected.\";\n } else {\n this.ble_pair_status.innerHTML = \"Not available.\";\n }\n }\n\n on_disconnect() {\n this.ble_pair_status.innerHTML = \"Disconnected.\";\n this.ble_pair_button.innerHTML = \"Pair\";\n }\n}\n\n\n// An instance of this class.\nexport let cell_bot_ble_gui;\n\n// Handler\n// =======\n// This must be invoked when the DOM is ready, before calling any other function in this file.\n$(document).ready(function () {\n cell_bot_ble_gui = new CellBotBleGui(\"ble_pair_button\", \"ble_pair_status\");\n});\n"],"names":["getAllProperties","object","properties","Set","key","Reflect","ownKeys","add","getPrototypeOf","Object","prototype","auto_bind","self","constructor","descriptor","getOwnPropertyDescriptor","value","bind","CellBotBle","this","clear_connection","is_little_endian","verbose_return","is_sim","INPUT","OUTPUT","uuid","resetHardware","pinMode","digitalWrite","digitalRead","ledcSetup","ledcAttachPin","ledcDetachPin","ledcWrite","server","disconnect","undefined","service","characteristic","is_ble_supported","Boolean","navigator","bluetooth","has_ble","on_availability_changed","getAvailability","addEventListener","paired","connected","pair","disconnect_callback","cellBot_service","device","requestDevice","filters","services","gatt","connect","getPrimaryService","invoke_Arduino","return_bytes","param_array","writeValue","return_value","return_data","readValue","getUint8","getInt8","getUint16","getInt16","getUint32","getInt32","getFloat32","getFloat64","message","buffer","slice","String","fromCharCode","apply","Uint8Array","get_characteristic","name","getCharacteristic","u8_pin","u8_mode","u8_value","u8_channel","d_freq","u8_resolution_bits","ArrayBuffer","dv","DataView","setUint8","setFloat64","u32_duty","setUint32","CellBotBleGui","pair_button_id","pair_status_id","ble_pair_button","document","getElementById","ble_pair_status","cell_bot_ble","then","on_ble_available","event","async_on_pair_clicked","disabled","innerHTML","on_disconnect","err","console","log","cell_bot_ble_gui","$","ready"],"sourceRoot":""}