sbitx icon indicating copy to clipboard operation
sbitx copied to clipboard

Change detection method for DE versus V2

Open microenh opened this issue 1 year ago • 1 comments

The current method (sbitx.c around line 1231) to detect V2 is to call i2cbb_read_i2c_block_data on the address of the power/swr bridge, which fails if it isn't installed as in the DE.

This call prints an error message to the terminal when it fails. If you instead use i2cbb_read_byte_data, it will also fail if the bridge is missing, but won't print the error message.

microenh avatar Aug 17 '23 12:08 microenh

Using the i2c read to identify the sbitx version is not a good idea. There are DE mods to add the SWR/Power sensor that would fail this test and assign V2 to a DE relay machine. I suggest removing the test in the settings function and only using the assignment of sbitx_version.

Remove: //detect the version of sbitx uint8_t response[4]; if(i2cbb_read_i2c_block_data(0x8, 0, 4, response) == -1) sbitx_version = SBITX_DE; else sbitx_version = SBITX_V2;

Since there are fewer DE sbitx, include a note to change the assignment DE: int sbitx_version = SBITX_V2; to int sbitx_version = SBITX_DE;

And then ./build.

Evan AC9TU

elhandjr avatar Feb 15 '24 10:02 elhandjr