forked from Blendman974/faceclaw
Display-list based menu slide animation
This commit is contained in:
1 parent
92e8def0f0
commit
c8d835176f
28 files changed
+1546
-263
No files matched your search
@@ -26,7 +26,7 @@ export type FirmwareInfo = {
|
||||
};
|
||||
|
||||
/** The Faceclaw firmware revision this build of the app needs. */
|
||||
export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 26;
|
||||
export const REQUIRED_FACECLAW_FIRMWARE_VERSION = 27;
|
||||
|
||||
const FACECLAW_PREFIX = "Faceclaw/";
|
||||
const LEGACY_PREFIX = "EVENCFW";
|
||||
|
||||
@@ -19,12 +19,12 @@ export type FirmwarePatchSet = {
|
||||
export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
"base": "g2_2.3.0.24.bin",
|
||||
"baseSha256": "187ccf2bcc5c17a212106e8a376745511e8289c4232b634a7ea94b9bf25a0979",
|
||||
"outputSha256": "dc9808a442dd475f3cb2c2945a5afa1408458222842cd9fef6288e435920c9b0",
|
||||
"outputSha256": "2d9f4200b3980156d65732e1d5fe4ba673768baf06683427710ff9a818cfb7ae",
|
||||
"patches": [
|
||||
{
|
||||
"offset": 1045797,
|
||||
"old": "38b584b0",
|
||||
"new": "5cf339be",
|
||||
"new": "5cf31db9",
|
||||
"desc": "ring receiver entry: timestamped unfiltered reports under framebuffer lease"
|
||||
},
|
||||
{
|
||||
@@ -36,49 +36,49 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1437923,
|
||||
"old": "fef788ff",
|
||||
"new": "fdf248fb",
|
||||
"new": "fcf22cfe",
|
||||
"desc": "cfw_ancs_event"
|
||||
},
|
||||
{
|
||||
"offset": 1437951,
|
||||
"old": "fef7e8fb",
|
||||
"new": "fdf282f8",
|
||||
"new": "fcf266fb",
|
||||
"desc": "cfw_ancs_open"
|
||||
},
|
||||
{
|
||||
"offset": 1437969,
|
||||
"old": "fef7e7fb",
|
||||
"new": "fdf299f8",
|
||||
"new": "fcf27dfb",
|
||||
"desc": "cfw_ancs_close"
|
||||
},
|
||||
{
|
||||
"offset": 1388387,
|
||||
"old": "39694d00",
|
||||
"new": "795e7d00",
|
||||
"new": "41547d00",
|
||||
"desc": "connection-bound ANCS EUS write callback"
|
||||
},
|
||||
{
|
||||
"offset": 971497,
|
||||
"old": "fff717f8",
|
||||
"new": "6ef369ff",
|
||||
"new": "6ef34dfa",
|
||||
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
|
||||
},
|
||||
{
|
||||
"offset": 971845,
|
||||
"old": "fef769ff",
|
||||
"new": "6ef3bbfe",
|
||||
"new": "6ef39ff9",
|
||||
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
|
||||
},
|
||||
{
|
||||
"offset": 979579,
|
||||
"old": "fdf74ef8",
|
||||
"new": "6cf3a0ff",
|
||||
"new": "6cf384fa",
|
||||
"desc": "bl faceclaw_input_bridge_received (ring relay and ordered private transport before worker pool)"
|
||||
},
|
||||
{
|
||||
"offset": 1428895,
|
||||
"old": "f8f76cfd",
|
||||
"new": "fcf294f8",
|
||||
"new": "fbf2c4fd",
|
||||
"desc": "bl cfw_receive_packet (private SID-f0 probe before TPL reassembly)"
|
||||
},
|
||||
{
|
||||
@@ -108,145 +108,145 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1248487,
|
||||
"old": "d4f712fb",
|
||||
"new": "2af3c0f8",
|
||||
"new": "29f354fc",
|
||||
"desc": "bl settings_send_wrapper (append caps field 100)"
|
||||
},
|
||||
{
|
||||
"offset": 1246183,
|
||||
"old": "f5f7e2f8",
|
||||
"new": "2af362fa",
|
||||
"new": "29f330fe",
|
||||
"desc": "bl settings_decode_wrapper (Faceclaw lease field 101)"
|
||||
},
|
||||
{
|
||||
"offset": 975219,
|
||||
"old": "02f083fc",
|
||||
"new": "6cf3c4fa",
|
||||
"new": "6bf39cfe",
|
||||
"desc": "bl faceclaw_display_start @ 0x467d68 (fail-open wake takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 975411,
|
||||
"old": "02f023fc",
|
||||
"new": "6cf332fb",
|
||||
"new": "6bf300ff",
|
||||
"desc": "bl faceclaw_display_start_headup @ 0x467e28 (fail-open wake takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 975103,
|
||||
"old": "07f085fb",
|
||||
"new": "6df372ff",
|
||||
"new": "6df356fa",
|
||||
"desc": "bl headup_gate (head-up sensor event -> EvenHub sys event 12 under lease)"
|
||||
},
|
||||
{
|
||||
"offset": 830549,
|
||||
"old": "19f03efb",
|
||||
"new": "91f321f9",
|
||||
"new": "90f305fc",
|
||||
"desc": "bl gesture_ring_press_mode (observe ring touch-down, preserve stock dispatch)"
|
||||
},
|
||||
{
|
||||
"offset": 830795,
|
||||
"old": "1ff071ff",
|
||||
"new": "91f3daf8",
|
||||
"new": "90f3befb",
|
||||
"desc": "bl gesture_press (owned event 9 before stock menu gate)"
|
||||
},
|
||||
{
|
||||
"offset": 830887,
|
||||
"old": "1ff043ff",
|
||||
"new": "91f3d4f8",
|
||||
"new": "90f3b8fb",
|
||||
"desc": "bl gesture_short_long (Faceclaw lease gates event 11 vs stock Menu path)"
|
||||
},
|
||||
{
|
||||
"offset": 831763,
|
||||
"old": "1ff08dfd",
|
||||
"new": "90f30aff",
|
||||
"new": "90f3eef9",
|
||||
"desc": "bl gesture_release (owned event 10 before stock menu gate)"
|
||||
},
|
||||
{
|
||||
"offset": 1570209,
|
||||
"old": "7fb50600",
|
||||
"new": "dbf251bc",
|
||||
"new": "daf2e5bf",
|
||||
"desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline"
|
||||
},
|
||||
{
|
||||
"offset": 1051545,
|
||||
"old": "f6f787f9",
|
||||
"new": "55f3fdfb",
|
||||
"new": "54f3cdff",
|
||||
"desc": "bl display_copy_hook @ 0x47a78e (640x480 direct framebuffer)"
|
||||
},
|
||||
{
|
||||
"offset": 1051861,
|
||||
"old": "f6f7e9f8",
|
||||
"new": "55f35ffb",
|
||||
"new": "54f32fff",
|
||||
"desc": "bl display_copy_hook @ 0x47a8ca (640x480 direct framebuffer)"
|
||||
},
|
||||
{
|
||||
"offset": 1262237,
|
||||
"old": "d9f7d0fd",
|
||||
"new": "26f335f9",
|
||||
"new": "25f365fd",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4ade92 (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1262337,
|
||||
"old": "d9f79efd",
|
||||
"new": "26f303f9",
|
||||
"new": "25f333fd",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4adef6 (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1309405,
|
||||
"old": "67f02dff",
|
||||
"new": "1af31bfa",
|
||||
"new": "19f33dfe",
|
||||
"desc": "bl compass_decode_capture (sample-matched GAF diagnostics)"
|
||||
},
|
||||
{
|
||||
"offset": 1307865,
|
||||
"old": "fff7c9fb",
|
||||
"new": "1af399fd",
|
||||
"new": "1af3bbf9",
|
||||
"desc": "bl compass_report_event (stock UI + heading with diagnostics over BLE)"
|
||||
},
|
||||
{
|
||||
"offset": 1300937,
|
||||
"old": "00210170",
|
||||
"new": "1cf37ffa",
|
||||
"new": "1bf3a1fe",
|
||||
"desc": "bl compass_preserve_accuracy (retain magnetic calibration under Faceclaw framebuffer lease)"
|
||||
},
|
||||
{
|
||||
"offset": 4537963,
|
||||
"old": "",
|
||||
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fc7b04ff690454ef66c6b4ff29c591446cff6ff75ccf2ff0bc2f229094ff6ff78002701260f93cde9100106e048f2a351c0f24501bff32f8f8847d9f800a0bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0ac804ff45c7007f0b6f8002800f0eb8129464218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f8957382f8967382f8977382f8987382f8997382f89a7382f89b7382f89c7382f89d7382f89e7382f89f7382f8a07382f8a17382f8a27382f8a37382f8a47382f8a57382f8a6738ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001f51457ff445afbff35f8f00bf49e8000121b159e8001f5145f8d039e71199012641ea04410024c0f8701206e048f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0ac804ff45c7006f0e8ff002800f01d8129464218373182f8704382f8714382f8724382f8734382f8744382f8754382f8764382f8774382f8784382f8794382f87a4382f87b4382f87c4382f87d4382f87e4382f87f4382f8804382f8814382f8824382f8834382f8844382f8854382f8864382f8874382f8884382f8894382f88a4382f88b4382f88c4382f88d4382f88e4382f88f4382f8904382f8914382f8924382f8934382f8944382f8954382f8964382f8974382f8984382f8994382f89a4382f89b4382f89c4382f89d4382f89e4382f89f4382f8a04382f8a14382f8a24382f8a34382f8a44382f8a54382f8a6438ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001fb9427ff445afbff35f8f00bf49e8000121b159e8001fb942f8d039e7d0f874a242f6f766c0f24406baf1000fbff35f8f4ad006f19a0250464ff0ff314ff0ff379047002840f08f811198002861d010980778a7f1170002285bd811980c2840f07881109e7078b178084300f07281f0780138022800f26d81b279f379747a42ea0322337a307942ea0342717942ea0463b27af67a192f42ea062200f07f83172f40f09583002a40f05481fe2800f0c987812800f0bb87002840f0d08751ea030040f0478101f060b904460020b047e8b104f51d7151e800afbaf1000f0cd1bff35f8f00bf41e80002002a00f0e78051e800afbaf1000ff5d00021bff32f8f0029bff35f8f00f0d680824692e74ff0ff3729e147f6df40c0f24f008047002701261397adf8507006e048f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f0b3804ff45c7006f09cfe002800f0ab8029464218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f8957382f8967382f8977382f8987382f8997382f89a7382f89b7382f89c7382f89d7382f89e7382f89f7382f8a07382f8a17382f8a27382f8a37382f8a47382f8a57382f8a6738ed1c0f800b08672a0f81c80a0f81e80a0f82080a0f82280a0f82480a0f82680a0f82880a0f82a80a0f82c80a0f82e80a0f83080a0f83280a0f83480a0f83680a0f83880a0f83a8059e8001fa1427ff445afbff35f8f00bf49e8000159b159e8001fa142f8d039e706f5a9718847bae601211ee70020109999b1119a8ab1097801f07f02b2f10b0418bf0124b2f11c0618bf01268a2924dc0b2926d01c2924d03fe00f9012a804f0e3f94ff0ff3701269df85100002812a818bf4ff0ff3704f001fb054646b99df8500028b94af21f30c0f247004c3080470f98002818bfc56013e09c2901d08b291bd160b14af21f31c0f247010746884797f8641119b997f80413384669b14ff0ff3742f6f760c0f2440000f5807150468847384647b0bde8f08f0f9012a8264004f0a2f91098007800f07f040f2c2ddd142c40f3a981152c00f01183162c00f01c831d2c40f0da83119801380228c0f04d8510994878897840ea0124b4f5007f00f2448504eb4400032101eb40001199884240f03b8505f031fe002800f036850e9600260127119400f053bd092c00f3d180052c00f00c82072c40f0af83002706e048f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f083864ff45c7006f035fd002800f07b86294600bf4218373182f8707382f8717382f8727382f8737382f8747382f8757382f8767382f8777382f8787382f8797382f87a7382f87b7382f87c7382f87d7382f87e7382f87f7382f8807382f8817382f8827382f8837382f8847382f8857382f8867382f8877382f8887382f8897382f88a7382f88b7382f88c7382f88d7382f88e7382f88f7382f8907382f8917382f8927382f8937382f8947382f895738Line truncated
|
||||
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fc5b04ff64c484ef66c6b4ff29c591446cff6ff78ccf2ff0bc2f229094ff6ff75002701260d93cde90e0106e048f2a351c0f24501bff32f8f8847d9f800a0bff35f8fd9f800000321cff680710140b1f1005fbff35f8f02d10168594544d04ff46d7006f04bfc002800f01a81414600bf42180c3182f8b47382f8b57382f8b67382f8b77382f8b87382f8b97382f8ba7382f8bb7382f8bc7382f8bd7382f8be7382f8bf73e4d1c0f800b086728583c583058445848584c584058545858585c585058645868586c5860587458759e8001f5145abd1bff35f8f49e8000121b159e8001f5145f8d0a1e70f99012641ea04410024c0f8701206e048f2a351c0f24501bff32f8f8847d9f80070bff35f8fd9f800000321cff680710140b1f1005fbff35f8f02d10168594544d04ff46d7006f0e5fb002800f0b480414600bf42180c3182f8b44382f8b54382f8b64382f8b74382f8b84382f8b94382f8ba4382f8bb4382f8bc4382f8bd4382f8be4382f8bf43e4d1c0f800b086728583c583058445848584c584058545858585c585058645868586c5860587458759e8001fb942abd1bff35f8f49e8000121b159e8001fb942f8d0a1e7d0f874a242f6f766c0f24406baf1000fbff35f8f4ad006f19a0250464ff0ff314ff0ff379047002840f023810f9800285fd00e980778a7f11700022859d80f980c2840f00c810e9e7078b178084300f00681f0780138022800f20181b279f379747a42ea0322337a307942ea0342717942ea0463b27af67a192f42ea062200f06f83172f40f08483002a40f0e880fe2800f07485812800f06685002840f07b8551ea030040f0db8000f0fabe04460020b047d8b104f51d7151e800afbaf1000f0bd1bff35f8f00bf41e80002002a7bd051e800afbaf1000ff6d00021bff32f8f0029bff35f8f6bd0824694e74ff0ff37bfe047f6df40c0f24f008047002701261197adf8487006e048f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f02d10168594549d04ff46d7006f003fb002842d0414642180c3182f8b47382f8b57382f8b67382f8b77382f8b87382f8b97382f8ba7382f8bb7382f8bc7382f8bd7382f8be7382f8bf73e4d1c0f800b086728583c583058445848584c584058545858585c585058645868586c5860587458759e8001fa142add1bff35f8f49e8000159b159e8001fa142f8d0a3e706f5a971884726e7012189e700200e9999b10f9a8ab1097801f07f02b2f10b0418bf0124b2f11c0618bf01268a2924dc0b2926d01c2924d03fe00d9010a804f0c7f84ff0ff3701269df84900002810a818bf4ff0ff3704f08bf9054646b99df8480028b94af21f30c0f247004c3080470d98002818bfc56013e09c2901d08b291bd160b14af21f31c0f247010746884797f8641119b997f80413384669b14ff0ff3742f6f760c0f2440000f5807150468847384645b0bde8f08f0d9010a8264004f086f80e98007800f07f041d2c00f07e0018bf1a2811d1d9f800100322cff680720a40b2f1005fbff35f8f0ad10a685a4504bf002281f8812303e0a4f115010129e9d90f2c0adc092c00f3cc80052c00f07882072c40f0f282002769e0142c00f37781102c00f07582112c40f0e7820f98022840f00b840e990878112840f006844878002840f0028445f64d50c0f24600804701284ff000077ff475af40f20830c0f210003590ff208df8d00044f25220c0f20100339040f2c960c0f248003446cde93677804798b148f27e30c2f2070000880122c1b264298df8cf2008d80721b0f5807f38bf03218df8cf108df8d00040f2d260adf8d800052035ae8df8da00f01d33a90522fff78afc4ff22507c0f247070120092132460c23b8470746264631e748f2a351c0f24501bff32f8f8847d9f80040bff35f8fd9f800000321cff680710140b1f1005fbff35f8f03d10168594500f04e844ff46d7006f0b4f9002800f04684414642180c3182f8b47382f8b57382f8b67382f8b77382f8b87382f8b97382f8ba7382f8bb7382f8bc7382f8bd7382f8be7382f8bf73e4d10121c0f800b081728583c583058445848584c584058545858585c585058645868586c5860587458759e8001fa142aad1bff35f8f49e80001002900f00c8459e8001fa142f6d09ee70a2c00f0b9810b2c40f02682d9f800500320cff680702840b0f1005fbff35f8f41f059802868002758457ff4baaed5f870030c9642f68d46c0f244060028a5f8807318bfb0470021a5f8b013c5f8ac13c5f8681185f8661185f86411d5f86c01c5f8601185f86511c5f86c11c5f80013a5f86c1320b148f2a351c0f245018847d5f87802002818bf04f02df90024c5f87842d5f8680320b148f2a351c0f245018847c5f86843a5f86c43286ca5f8444040b1b047286c06f166018847002804bf002028644bf63940c0f251008047d9f800400320cff680702040b0f1005fbff35f8f2ad12068584527d194f877010027c4f8807188b149f25962c0f25902002044f2436184f8777190474ef6e378c0f25a08c04708f1bc008047d4f8840184f8707150b1b047d4f8840106f166018847002804bf0020c4f88401d9f800000321cff680710140b1f1005fbff35f8f40f00a860168594540f0068690f8a811002900f0fb8506f0c9fb00f0fdbd152c00f06b81162c40f070810f9801380228c0f093820e994ff0ff374878897840ea0120b0f5007f3ff605ae03210f9a01eb400191427ff4fead002700288df8d4708df8d5708df8d6708df8d7708df8d8708df8d9708df8da708df8db708df8dc708df8dd708df8de708df8df708df8e0708df8e1708df8e2708df8e3708df8e4708df8e5708df8e6708Line truncated
|
||||
"desc": "append injected blobs to main-app payload"
|
||||
},
|
||||
{
|
||||
"offset": 779123,
|
||||
"old": "805a3900",
|
||||
"new": "dc443a00",
|
||||
"new": "1c483a00",
|
||||
"desc": "main-app subheader payload size (ps)"
|
||||
},
|
||||
{
|
||||
"offset": 152,
|
||||
"old": "005b3900",
|
||||
"new": "5c453a00",
|
||||
"new": "9c483a00",
|
||||
"desc": "main-app TOC entry size (ps + 128)"
|
||||
},
|
||||
{
|
||||
"offset": 779243,
|
||||
"old": "805a3904",
|
||||
"new": "dc443a04",
|
||||
"new": "1c483a04",
|
||||
"desc": "main-app preamble length (low 24 bits)"
|
||||
},
|
||||
{
|
||||
"offset": 779247,
|
||||
"old": "effdbcea",
|
||||
"new": "fe2d93a9",
|
||||
"new": "b66f5542",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin preamble crc32"
|
||||
},
|
||||
{
|
||||
"offset": 156,
|
||||
"old": "c0c6322a",
|
||||
"new": "13f7ac84",
|
||||
"new": "d0697cd9",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)"
|
||||
},
|
||||
{
|
||||
"offset": 779127,
|
||||
"old": "c0c6322a",
|
||||
"new": "13f7ac84",
|
||||
"new": "d0697cd9",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { MenuHighlightAnimation } from "../ui/menu-highlight-motion";
|
||||
import { Glyph } from "./bdffont";
|
||||
import { wrapText } from "./textwrap";
|
||||
|
||||
@@ -73,7 +74,7 @@ export type PlacedGlyph = {
|
||||
* from the moment it is placed.
|
||||
*/
|
||||
export type PlacedImage = {
|
||||
presentation?: { mode?: "image" | "masked-image"; radius: number; background: number; border: number; depth: number; occlusions?: readonly { x: number; y: number; width: number; height: number }[] };
|
||||
presentation?: { animation?: MenuHighlightAnimation; mode?: "image" | "masked-image"; radius: number; background: number; border: number; depth: number; occlusions?: readonly { x: number; y: number; width: number; height: number }[] };
|
||||
kind: "image";
|
||||
source: GrayImage;
|
||||
x: number;
|
||||
@@ -394,7 +395,7 @@ export class GrayImage {
|
||||
hash = mixInt(hash, placed.source.width);
|
||||
hash = mixInt(hash, placed.source.height);
|
||||
hash = mixInt(hash, placed.source.sourceContentHash32());
|
||||
if (placed.presentation) { const p = placed.presentation; for (const value of [p.radius, p.background, p.border, p.depth, p.mode === "image" ? 1 : p.mode === "masked-image" ? 2 : 0]) hash = mixInt(hash, value); }
|
||||
if (placed.presentation) { const p = placed.presentation; for (const value of [p.radius, p.background, p.border, p.depth, p.mode === "image" ? 1 : p.mode === "masked-image" ? 2 : 0, p.animation?.token ?? 0, p.animation?.dx ?? 0, p.animation?.dy ?? 0]) hash = mixInt(hash, value); }
|
||||
} else {
|
||||
hash = mixInt(hash, 0xf17e);
|
||||
hash = mixInt(hash, placed.font.atlasTag);
|
||||
@@ -506,9 +507,9 @@ export class GrayImage {
|
||||
}
|
||||
|
||||
/** Retain the selected row separately from the menu surface for glasses-side composition. */
|
||||
drawMenuSelection(source: GrayImage, x: number, y: number, background: number, border: number, radius = 8, depth = 2): void {
|
||||
drawMenuSelection(source: GrayImage, x: number, y: number, background: number, border: number, radius = 8, depth = 2, animation?: MenuHighlightAnimation): void {
|
||||
this.drawList.push({ kind: "image", source: source.withDrawsBaked(), x, y,
|
||||
presentation: { radius, background, border, depth } });
|
||||
presentation: { radius, background, border, depth, animation } });
|
||||
}
|
||||
|
||||
/** Replay an image at stereo depth. Masked images preserve intentional gray8 black (1). */
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
import type { PlacedImage } from './image'
|
||||
|
||||
/** Bridge record: tag 3 (selection), 4 (image), 5 (gray8-masked image), signed xy, u16 wh/radius, gray fill/stroke, signed depth, restore-count, gray pixels, restore rectangles. */
|
||||
/** Bridge record: tag 3 (selection), 4 (image), 5 (gray8-masked image), 6 (animated selection), signed xy, u16 wh/radius, gray fill/stroke, signed depth, restore-count, gray pixels, restore rectangles. */
|
||||
export function encodePresentation(draw: PlacedImage): Uint8Array {
|
||||
const p = draw.presentation!
|
||||
const { width, height, pixels } = draw.source
|
||||
if (width < 1 || height < 1 || width > 640 || height > 480 || 5 + Math.ceil(width / 2) * height > 65536) throw new Error('Presentation image exceeds the resource size limit')
|
||||
if (!Number.isInteger(p.depth) || p.depth < -128 || p.depth > 127) throw new Error('Invalid menu depth')
|
||||
if ((p.occlusions?.length ?? 0) > 2048) throw new Error('Too many menu occlusion rectangles')
|
||||
const bytes = new Uint8Array(16 + width * height + (p.occlusions?.length ?? 0) * 8), view = new DataView(bytes.buffer)
|
||||
bytes[0] = p.mode === "image" ? 4 : p.mode === "masked-image" ? 5 : 3
|
||||
const animation = p.animation;
|
||||
const header = animation ? 26 : 16;
|
||||
const bytes = new Uint8Array(header + width * height + (p.occlusions?.length ?? 0) * 8), view = new DataView(bytes.buffer)
|
||||
bytes[0] = animation ? 6 : p.mode === "image" ? 4 : p.mode === "masked-image" ? 5 : 3
|
||||
view.setInt16(1, draw.x, true); view.setInt16(3, draw.y, true)
|
||||
view.setUint16(5, width, true); view.setUint16(7, height, true); view.setUint16(9, p.radius, true)
|
||||
bytes[11] = p.background; bytes[12] = p.border; view.setInt8(13, p.depth)
|
||||
view.setUint16(14, p.occlusions?.length ?? 0, true)
|
||||
bytes.set(pixels, 16)
|
||||
let offset = 16 + pixels.length
|
||||
if (animation) {
|
||||
view.setInt16(16, animation.dx, true); view.setInt16(18, animation.dy, true);
|
||||
view.setUint16(20, Math.max(0, Math.min(500, Date.now() - animation.startedAt)), true);
|
||||
view.setUint32(22, animation.token, true);
|
||||
}
|
||||
bytes.set(pixels, header)
|
||||
let offset = header + pixels.length
|
||||
for (const rect of p.occlusions ?? []) {
|
||||
view.setUint16(offset, rect.x, true); view.setUint16(offset + 2, rect.y, true)
|
||||
view.setUint16(offset + 4, rect.width, true); view.setUint16(offset + 6, rect.height, true); offset += 8
|
||||
@@ -22,13 +29,16 @@ export function encodePresentation(draw: PlacedImage): Uint8Array {
|
||||
return bytes
|
||||
}
|
||||
|
||||
export type Selection = { mode?: "image" | "masked-image"; x: number; y: number; width: number; height: number; radius: number; background: number; border: number; depth: number; pixels: Uint8Array; occlusions: { x: number; y: number; width: number; height: number }[] }
|
||||
export type Selection = { animation?: { dx: number; dy: number; startedAt: number; token: number }; mode?: "image" | "masked-image"; x: number; y: number; width: number; height: number; radius: number; background: number; border: number; depth: number; pixels: Uint8Array; occlusions: { x: number; y: number; width: number; height: number }[] }
|
||||
export function readPresentation(bytes: Uint8Array, offset: number): { selection: Selection; end: number } {
|
||||
const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength), w = v.getUint16(offset + 5, true), h = v.getUint16(offset + 7, true)
|
||||
const header = bytes[offset] === 6 ? 26 : 16
|
||||
const selection: Selection = { mode: bytes[offset] === 4 ? "image" : bytes[offset] === 5 ? "masked-image" : undefined, x: v.getInt16(offset+1,true), y: v.getInt16(offset+3,true), width:w, height:h,
|
||||
radius:v.getUint16(offset+9,true), background:bytes[offset+11]!, border:bytes[offset+12]!, depth:v.getInt8(offset+13),
|
||||
pixels:bytes.slice(offset+16,offset+16+w*h), occlusions:[] }
|
||||
let end=offset+16+w*h
|
||||
pixels:bytes.slice(offset+header,offset+header+w*h), occlusions:[] }
|
||||
if (header === 26) selection.animation = { dx:v.getInt16(offset+16,true), dy:v.getInt16(offset+18,true),
|
||||
startedAt:Date.now()-v.getUint16(offset+20,true), token:v.getUint32(offset+22,true) }
|
||||
let end=offset+header+w*h
|
||||
for(let i=0;i<v.getUint16(offset+14,true);i++) { selection.occlusions.push({x:v.getUint16(end,true),y:v.getUint16(end+2,true),width:v.getUint16(end+4,true),height:v.getUint16(end+6,true)});end+=8 }
|
||||
return {selection,end}
|
||||
}
|
||||
@@ -36,7 +46,7 @@ export function presentationRecords(buffer: ArrayBuffer | null): Selection[] {
|
||||
if (!buffer) return []
|
||||
const bytes=new Uint8Array(buffer), result:Selection[]=[]
|
||||
for(let p=0;p<bytes.length;) {
|
||||
if(bytes[p]===3 || bytes[p]===4 || bytes[p]===5) { const record=readPresentation(bytes,p);result.push(record.selection);p=record.end }
|
||||
if(bytes[p]===3 || bytes[p]===4 || bytes[p]===5 || bytes[p]===6) { const record=readPresentation(bytes,p);result.push(record.selection);p=record.end }
|
||||
else if(bytes[p]===0) p+=12
|
||||
else if(bytes[p]===1) p+=9
|
||||
else if(bytes[p]===2) p+=7+bytes[p+6]!*7
|
||||
@@ -52,13 +62,21 @@ export function paintPresentation(output: Uint8Array, screen: Uint8Array, width:
|
||||
const dx=Math.max(0,2*r-(2*Math.min(x,w-1-x)+1)),dy=Math.max(0,2*r-(2*Math.min(y,h-1-y)+1))
|
||||
return dx*dx+dy*dy<=4*r*r
|
||||
}
|
||||
const t = row.animation ? Math.max(0, Math.min(1, (Date.now() - row.animation.startedAt) / 500)) : 1
|
||||
const remaining = 1 - t * t * (3 - 2 * t)
|
||||
const highlightX = Math.trunc(row.x + (row.animation?.dx ?? 0) * remaining)
|
||||
const highlightY = Math.trunc(row.y + (row.animation?.dy ?? 0) * remaining)
|
||||
if (!row.mode) for(let yy=0;yy<row.height;yy++) for(let xx=0;xx<row.width;xx++) {
|
||||
const x=highlightX+xx+shift,y=highlightY+yy
|
||||
if(x<0||y<0||x>=width||y>=height || !inside(xx,yy,row.width,row.height,row.radius)) continue
|
||||
const i=y*width+x
|
||||
output[i]=!inside(xx-1,yy-1,row.width-2,row.height-2,Math.max(0,row.radius-1))?q(row.border)*16:Math.max(output[i]!,q(row.background)*16)
|
||||
}
|
||||
for(let yy=0;yy<row.height;yy++) for(let xx=0;xx<row.width;xx++) {
|
||||
const x=row.x+xx+shift,y=row.y+yy
|
||||
if(x<0||y<0||x>=width||y>=height) continue
|
||||
const i=y*width+x
|
||||
if(!row.mode && inside(xx,yy,row.width,row.height,row.radius)) output[i]=!inside(xx-1,yy-1,row.width-2,row.height-2,Math.max(0,row.radius-1))?q(row.border)*16:Math.max(output[i]!,q(row.background)*16)
|
||||
const value=q(row.pixels[yy*row.width+xx]!)
|
||||
if(row.mode === "masked-image" ? row.pixels[yy*row.width+xx] !== 0 : value !== 0) output[i]=value*16
|
||||
if(row.mode === "masked-image" ? row.pixels[yy*row.width+xx] !== 0 : value !== 0) output[y*width+x]=value*16
|
||||
}
|
||||
for(const r of row.occlusions) for(let yy=r.y;yy<r.y+r.height;yy++) for(let xx=r.x;xx<r.x+r.width;xx++) if(xx>=0&&yy>=0&&xx<width&&yy<height) output[yy*width+xx]=q(screen[yy*width+xx]!)*16
|
||||
}
|
||||
@@ -10,7 +10,8 @@ type Surface = SurfaceConfiguration & { pixels: Uint8Array; visible: boolean; se
|
||||
export class SurfaceCompositor {
|
||||
private readonly surfaces = new Map<string, Surface>()
|
||||
private shellScene: Uint8Array | null = null
|
||||
setShellScene(bytes: Uint8Array): void { this.shellScene = new Uint8Array(bytes) }
|
||||
private shellReceivedAt = 0
|
||||
setShellScene(bytes: Uint8Array): void { this.shellScene = new Uint8Array(bytes); this.shellReceivedAt = Date.now() }
|
||||
private dimBelow = 0
|
||||
private dimFactor = 1
|
||||
private blanked = false
|
||||
@@ -92,7 +93,7 @@ export class SurfaceCompositor {
|
||||
if(x+xx+shift>=0 && y+yy>=0 && x+xx+shift<this.width && y+yy<this.height) output[(y+yy)*this.width+x+xx+shift]=quantize(bytes[p+yy*w+xx])*16
|
||||
}
|
||||
p+=w*h
|
||||
for(let j=0;j<selections;j++) { const record=readPresentation(bytes,p);p=record.end;paintPresentation(output,screen,this.width,this.height,record.selection) }
|
||||
for(let j=0;j<selections;j++) { const record=readPresentation(bytes,p);p=record.end;if(record.selection.animation) record.selection.animation.startedAt -= Date.now()-this.shellReceivedAt;paintPresentation(output,screen,this.width,this.height,record.selection) }
|
||||
}
|
||||
}
|
||||
return output
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
export type MenuHighlightAnimation = { dx: number; dy: number; startedAt: number; token: number };
|
||||
|
||||
let nextToken = 1;
|
||||
|
||||
/** Eligibility is decided by menu navigation, before the display-list bridge. */
|
||||
export class MenuHighlightMotion {
|
||||
private previous?: { index: number; scroll: number; x: number; y: number; width: number; height: number };
|
||||
private fromIndex: number | null = null;
|
||||
private animation?: MenuHighlightAnimation;
|
||||
|
||||
navigate(from: number, wrapped: boolean): void {
|
||||
this.fromIndex = wrapped ? null : from;
|
||||
}
|
||||
|
||||
paint(index: number, scroll: number, x: number, y: number, width: number, height: number, now: number): MenuHighlightAnimation | undefined {
|
||||
const previous = this.previous;
|
||||
if (!previous || previous.index !== index || previous.scroll !== scroll ||
|
||||
previous.x !== x || previous.y !== y || previous.width !== width || previous.height !== height) {
|
||||
let fromX = previous?.x ?? x, fromY = previous?.y ?? y;
|
||||
if (previous && this.animation) {
|
||||
const t = Math.max(0, Math.min(1, (now - this.animation.startedAt) / 500));
|
||||
const remaining = 1 - t * t * (3 - 2 * t);
|
||||
fromX += this.animation.dx * remaining;
|
||||
fromY += this.animation.dy * remaining;
|
||||
}
|
||||
const eligible = previous && previous.index !== index && this.fromIndex === previous.index &&
|
||||
previous.scroll === scroll && previous.width === width && previous.height === height;
|
||||
this.animation = eligible ? { dx: Math.round(fromX - x), dy: Math.round(fromY - y), startedAt: now, token: nextToken++ } : undefined;
|
||||
this.fromIndex = null;
|
||||
this.previous = { index, scroll, x, y, width, height };
|
||||
}
|
||||
return this.animation && now - this.animation.startedAt < 500 ? this.animation : undefined;
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -1,3 +1,4 @@
|
||||
import { MenuHighlightMotion } from "./menu-highlight-motion";
|
||||
import { G2_LENS_HEIGHT, G2_LENS_WIDTH, GrayImage, type UiFont } from "../graphics/image";
|
||||
import { wrapText } from "../graphics/textwrap";
|
||||
import { getDefaultSmallFont } from "../graphics/ui-fonts";
|
||||
@@ -19,7 +20,7 @@ const MENU_HIGHLIGHT_SELECTED_BACKGROUND_FILL = 15;
|
||||
const MENU_HIGHLIGHT_SELECTED_BORDER_STROKE = 45;
|
||||
|
||||
export type MenuLayout = {
|
||||
/** Stereo depth of the menu surface; selected rows add +2. */
|
||||
/** Stereo depth of the menu surface, including the selected row. */
|
||||
depth?: number;
|
||||
/** Left edge, or "center" to center horizontally on the painted surface. */
|
||||
x: number | "center";
|
||||
@@ -193,6 +194,7 @@ export const CONTEXT_MENU_DIM = 0.25;
|
||||
export class MenuLayer implements Layer {
|
||||
private selectedIndex = 0;
|
||||
private scrollRow = 0;
|
||||
private readonly highlightMotion = new MenuHighlightMotion();
|
||||
|
||||
get depth(): number { return this.layout.depth ?? 0; }
|
||||
|
||||
@@ -288,7 +290,11 @@ export class MenuLayer implements Layer {
|
||||
} else {
|
||||
row.drawText(font, textX, textY + LIST_ROW_TEXT_INSET, item.label, disabled ? 70 : selected ? 255 : 200);
|
||||
}
|
||||
if (selected) image.drawMenuSelection(row, x + 12, rowY, focused ? MENU_HIGHLIGHT_SELECTED_BACKGROUND_FILL : 0, MENU_HIGHLIGHT_SELECTED_BORDER_STROKE, 8, 2);
|
||||
if (selected) {
|
||||
const animation = this.highlightMotion.paint(index, this.scrollRow, x + 12, rowY, width - 24, rowHeight - 1, Date.now());
|
||||
image.drawMenuSelection(row, x + 12, rowY, focused ? MENU_HIGHLIGHT_SELECTED_BACKGROUND_FILL : 0,
|
||||
MENU_HIGHLIGHT_SELECTED_BORDER_STROKE, 8, 0, animation);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.items.length > visibleRowCount) {
|
||||
@@ -315,9 +321,11 @@ export class MenuLayer implements Layer {
|
||||
}
|
||||
switch (event.type) {
|
||||
case "scroll-up":
|
||||
this.highlightMotion.navigate(this.selectedIndex, this.selectedIndex === 0);
|
||||
this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length;
|
||||
return;
|
||||
case "scroll-down":
|
||||
this.highlightMotion.navigate(this.selectedIndex, this.selectedIndex === this.items.length - 1);
|
||||
this.selectedIndex = (this.selectedIndex + 1) % this.items.length;
|
||||
return;
|
||||
case "double-click":
|
||||
|
||||
Reference in new issue
Block a user