mnsnoop / esp32Micronet

6 stars 3 forks source link

Working well #1

Open pionex opened 2 years ago

pionex commented 2 years ago

Apologies for creating an issue, but I did not see any other way to make contact. This code is working great so far and only took me minutes to get my setup working. I am able to send and receive data from my micronet network. I saw a comment that you don't have anything that sends data, so let me know if I can provide some logs for you. I am currently working on being able to set and toggle the race timer.

mnsnoop commented 2 years ago

Good to hear. No worries on starting issues. I don't have anything micronet that generates data so the micronet to nmea bridge code is untested. I don't need data logs as much as people to test it. My messages was more a warning to those people that some of the conversions maybe off.

The race timer can be set multiple ways. My duel displays do it via 0xFD command packets. The project currently lacks the ability to send command packets because there was no need. The second way to set and start the timer is in the 0x02 data packet. You can send the same 0xFD command in a 0x02 packet. Here is the basic structure:

p->sHeader.bData[iLength + 0] = 0x06; //data length p->sHeader.bData[iLength + 1] = 0xFD; //data id p->sHeader.bData[iLength + 2] = 0x00; //unk p->sHeader.bData[iLength + 3] = 0x05; //minutes p->sHeader.bData[iLength + 4] = 0x00; //seconds p->sHeader.bData[iLength + 5] = 0x00; //unk p->sHeader.bData[iLength + 6] = 0x00; //0x00 = stop, 0x01 = run p->sHeader.bData[iLength + 7] = GetCRC(p->sHeader.bData + iLength, 7); //0x64;

If you send this every second you'll have to update the values as the timer runs or else it'll reset the value.