Repository navigation
v2.205.0
The laser and connect fields are checked like the others
The sweep behind v2.204.0 tested /api/module/laser on a module that is not tunable. There every request is refused for that reason alone, so the sweep said nothing about the fields themselves. On the tunable demo module, the endpoint behaved the way the others had before v2.204.0:
grid_code,channel,fine_offset_ghzandtarget_power_dbmset to a string ornullgave a 500.channel: 0.5became channel 0.truebecame 1 GHz of fine offset or 1 dBm of target power, and was written.grid_code: 21went down as 5 (100 GHz) through& 0x0F.fine_tuning_enabled: "no"turned fine tuning on.
Now
- Each lane entry is checked before anything is read or written:
laneandchannelare whole numbers, andgrid_codeis 0–15 (12h:128 bits 7–4). - Offset and power are numbers other than
true. NaN and infinity reach the advertised range check, which refuses them. fine_tuning_enabledtakestrueorfalseonly./api/connectused to handtrue,1.5, −1 and 256 to the adapter as a bus number or I2C address. The address must now be a 7-bit address from 0 to 127 (the module answers at 80, 50h), and the bus 0 or more. Hex strings such as"0x50"still work. A refused connect leaves the current connection alone.
2951 end-to-end tests. 32-bit build, as CH341 requires.