mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2026-03-30 13:49:48 +08:00
inverse red ram with register
This commit is contained in:
@@ -21,13 +21,10 @@
|
||||
<div class="flex-group debug">
|
||||
<label for="epddriver">驱动</label>
|
||||
<select id="epddriver" onchange="filterDitheringOptions()">
|
||||
<option value="01">UC8176(黑白屏)</option>
|
||||
<option value="03">UC8176(三色屏)</option>
|
||||
<option value="05">UC8276(三色屏)</option>
|
||||
<option value="04">SSD1619(黑白屏)</option>
|
||||
<option value="02">SSD1619(三色屏)</option>
|
||||
<option value="04">SSD1683(黑白屏)</option>
|
||||
<option value="02">SSD1683(三色屏)</option>
|
||||
<option value="01">UC8176/UC8276(黑白屏)</option>
|
||||
<option value="03">UC8176/UC8276(三色屏)</option>
|
||||
<option value="04">SSD1619/SSD1683(黑白屏)</option>
|
||||
<option value="02">SSD1619/SSD1683(三色屏)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-group debug">
|
||||
|
||||
@@ -124,7 +124,7 @@ async function sendimg() {
|
||||
status.parentElement.style.display = "block";
|
||||
|
||||
if (mode.startsWith('bwr')) {
|
||||
const invert = (driver === '02') || (driver === '05');
|
||||
const invert = (appVersion < 0x16) ? (driver === '02') : false;
|
||||
await epdWrite(driver === "02" ? 0x24 : 0x10, canvas2bytes(canvas, 'bw'));
|
||||
await epdWrite(driver === "02" ? 0x26 : 0x13, canvas2bytes(canvas, 'red', invert));
|
||||
} else {
|
||||
@@ -219,11 +219,11 @@ async function connect() {
|
||||
try {
|
||||
addLog("正在连接: " + bleDevice.name);
|
||||
gattServer = await bleDevice.gatt.connect();
|
||||
addLog(' 找到 GATT Server');
|
||||
addLog(' 找到 GATT Server');
|
||||
epdService = await gattServer.getPrimaryService('62750001-d828-918d-fb46-b6c11c675aec');
|
||||
addLog(' 找到 EPD Service');
|
||||
addLog(' 找到 EPD Service');
|
||||
epdCharacteristic = await epdService.getCharacteristic('62750002-d828-918d-fb46-b6c11c675aec');
|
||||
addLog(' 找到 Characteristic');
|
||||
addLog(' 找到 Characteristic');
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
if (e.message) addLog("connect: " + e.message);
|
||||
|
||||
Reference in New Issue
Block a user