src/app/www/js/functions.js
/**
     * Splits a long string into multiple chunks and sends them with delay.
     * It prevents the ESP32 bluetooth buffer from overflowing.
     * @param {String} text 
     */
Splits a long string into multiple chunks and sends them with delay.
It prevents the ESP32 bluetooth buffer from overflowing.
@param {String} text
Splits a long string into multiple chunks and sends them with delay . It prevents the ESP32 bluetooth buffer from overflowing . @param { String } text
async delayedBluetoothSend(text) {
        const chunks = text.match(/.{1,80}/g);
        for(let i = 0; i < chunks.length; i++) {
            this.bluetoothSend(chunks[i]);
            await sleep(300);
        }
        this.bluetoothSend('\0');
    }
async delayedBluetoothSend ( text ) { const chunks = text . match ( / .{1,80} / g ) ; for ( let i = 0 ; i < chunks . length ; i ++ ) { this . bluetoothSend ( chunks [ i ] ) ; await sleep ( 300 ) ; } this . bluetoothSend ( '\0' ) ; }
Splits a long string into multiple chunks and sends them with delay.
Splits a long string into multiple chunks and sends them with delay .