Commit 70d0961
committed
MZTC: match the corrected firmware MSP contract
Follows the firmware changes in iNavFlight/inav#11837.
MSP codes
The commands move from 0x3000 into INAV's own range and now sit contiguously
from 0x2240 to 0x2249. 0x3000 and 0x3001 are MSP2_BETAFLIGHT_BIND and
MSP2_RX_BIND. The old block collided with them. The codes nothing
implemented are dropped. CALIBRATE, INIT_STATUS, SAVE_CONFIG, RESTORE_DEFAULTS
and RECONNECT had no firmware handler. MSP2_SET_MZTC_VIGNETTING is added.
Payloads
MSP2_MZTC_CONFIG is a fixed 15 byte payload read one field at a time. The old
parser assumed an unpadded C struct and read the thresholds at offsets 17 and
21. The firmware struct had alignment padding there. Both offsets were wrong on the
wire in both directions. The send path no longer writes float32.
MSP2_MZTC_STATUS is a fixed 7 byte payload and is parsed at all now. It was
never handled. connected is a real field, set only after the camera answers a
command.
Removed fields
The five RC channel fields were never in the payload. The temperature fields,
the frame fields, bad pixel removal, vignetting correction and the crosshair
flag are gone from the firmware. The camera reports no temperature and no frame
over its serial protocol. The other three were stored but never transmitted.
Serial port index
mztc_port is the zero-based serialPortIdentifier_e value that the firmware
hands to openSerialPort(). Three places added 1 to it and special-cased UART6.
That pointed the driver at the wrong UART.
OSD
The ten elements at invented ids 200 to 209 are replaced with the one the
firmware provides, MZTC_STATUS at id 171. The old entries were gated on
FC.FEATURES.MZTC. That does not exist. A localization string is added for the
name.
State
FC.MZTC_CONFIG and FC.MZTC_STATUS are declared in fc.js resetState like every
other FC block. MZTC_CONFIG was previously created ad-hoc by the MSP handler.
Localization
The MassZero block had been inserted into messages.json twice. All 17 keys were
duplicated. JSON keeps the last definition, leaving the earlier copy as dead
weight. The earlier copy is removed along with the strings for the
settings that no longer exist. The operating mode help text described frame
capture modes the firmware does not have.
Dependency
electron-prebuilt-compile is reverted along with the 13385 lines of
package-lock churn it pulled in. Nothing in the tree references it.1 parent 8379ca2 commit 70d0961
10 files changed
Lines changed: 4031 additions & 9835 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
109 | 132 | | |
110 | 133 | | |
111 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
1670 | | - | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1701 | 1687 | | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1736 | 1727 | | |
1737 | 1728 | | |
1738 | 1729 | | |
| |||
2341 | 2332 | | |
2342 | 2333 | | |
2343 | 2334 | | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
2353 | 2339 | | |
2354 | 2340 | | |
2355 | 2341 | | |
2356 | | - | |
2357 | | - | |
| 2342 | + | |
2358 | 2343 | | |
2359 | 2344 | | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
2363 | 2348 | | |
2364 | 2349 | | |
2365 | 2350 | | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
2378 | | - | |
2379 | | - | |
2380 | | - | |
2381 | | - | |
2382 | | - | |
2383 | | - | |
| 2351 | + | |
2384 | 2352 | | |
2385 | | - | |
2386 | | - | |
2387 | | - | |
2388 | | - | |
| 2353 | + | |
2389 | 2354 | | |
2390 | 2355 | | |
2391 | 2356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
1376 | | - | |
1377 | | - | |
| 1376 | + | |
| 1377 | + | |
1378 | 1378 | | |
1379 | | - | |
| 1379 | + | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | 1382 | | |
1431 | 1383 | | |
1432 | 1384 | | |
| |||
6269 | 6221 | | |
6270 | 6222 | | |
6271 | 6223 | | |
6272 | | - | |
6273 | | - | |
6274 | | - | |
6275 | | - | |
6276 | | - | |
6277 | | - | |
6278 | | - | |
6279 | | - | |
6280 | | - | |
6281 | | - | |
6282 | | - | |
6283 | | - | |
6284 | | - | |
6285 | | - | |
6286 | | - | |
6287 | | - | |
6288 | | - | |
6289 | | - | |
6290 | 6224 | | |
6291 | | - | |
| 6225 | + | |
6292 | 6226 | | |
6293 | 6227 | | |
6294 | 6228 | | |
| |||
0 commit comments