Hi,
i want to create my DIY device with an ESP32.
The connection and the data transfer is working well but not in combination with GPS and RC3 Messages. If I send GPS or RC Data everything is working well.
I tested a delay between those two messages and this works and works not.
Has someone an idea?
Additional questions:
- Can I send GPS and RC data in one go? If yes how?
- Do I need the timestamp and the count? If yes how has the timestamp to look like?
My Code is:
if (gpsPort->available())
{
size_t len = gpsProv.gpsPort->available();
uint8_t sbuf[len];
gpsPort->readBytes(sbuf, len);
SerialBT.write(sbuf, len); //This transfers the GPS NMEA message
uint8_t checksum = 0;
char buffer[255];
sprintf(buffer, "RC3,%s,%s,%lu,%s,%s,%s,%s,%s,%s,%s,%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s",
"",
"",
random(1, 100),
"-0.560",
"-0.290",
"7.938",
"-0.125",
"0.063",
"",
"",
"",
"-40.438",
"2.625",
"70.875",
"9.875",
"-48.250",
"-6.360",
"-0.340",
"7.450",
"-6.100",
"-0.940",
"7.170",
"0",
"1",
"10");
int lenght = strlen(buffer);
for (int i = 0; i < lenght; i++)
{
checksum = checksum ^ (uint8_t)buffer[i];
}
btProv.SerialBT.printf("$%s*%X\r\n", buffer, checksum, sbuf); // This creates the RC3 Message
}
Comments
- You can mix NMEA 0183 sentences and RC2/RC3
- Previously you needed RC2/RC3 have a timestamp if there's mixed NMEA 0183, but I think it will work as-is now, just mix the sentences in the stream.
- Count is always needed if there's no timestamp
If that does not work, can you email me a couple minutes worth of your data output to tracks(at)racechrono.com? I can check why it fails.
After the connection RC shows me the GPS and RC data and after the first send I only see the updating RC messages and the GPS data is stuck
Is it possible to name the analog channels that a can say channel 8 is water temperature for example?