@@ -359,7 +359,7 @@ generate-screen-html -> string:
359359 submitMulti(toSend);
360360 }
361361
362- function box2msgb(box, pageId, draw = true) {
362+ function box2msgb(box, pageId, isLastMsg = true) {
363363 const ui16le = (num) => {
364364 return [num & 0xff, (num >> 8) & 0xff];
365365 };
@@ -372,13 +372,15 @@ generate-screen-html -> string:
372372 b.push(0);
373373 let d = new Map();
374374 d.set(3, [pageId]);
375- d.set(21 , [box.exportPositionX]);
376- d.set(22 , [box.exportPositionY]);
377- d.set(23 , [box.exportSizeX]);
378- d.set(24 , [box.exportSizeY]);
375+ d.set(7 , [box.exportPositionX]);
376+ d.set(8 , [box.exportPositionY]);
377+ d.set(9 , [box.exportSizeX]);
378+ d.set(10 , [box.exportSizeY]);
379379 d.set(25, box.cArrayOutput.split(',').map(byte => parseInt(byte, 16)));
380- if(!draw) {
381- d.set(27, [1]);
380+ if(isLastMsg) {
381+ d.set(6, [4]); // FullRedrawWithoutClear
382+ } else {
383+ d.set(6, [3]); // BufferOnly
382384 }
383385 b.push(...ui16le(d.size));
384386 for (let [key, value] of d) {
0 commit comments