zs6buj / AntTracker

Antenna Tracker for tracking a moving model aircraft or drone with a small high-gain UHF or SHF antenna
GNU General Public License v3.0
141 stars 41 forks source link

Esp32 with Bluetooth telemetry #66

Open HKR1987 opened 3 months ago

HKR1987 commented 3 months ago

I have opentx (open i6x) with elrs module. successful send telemetry over bluetooth to android telemetry app (telemetry viewer) but when i send it to anttracker its not working i got this output:

14:12:21.388 -> Starting AntTrack version:2.20.04 14:12:21.388 -> Setting up Wire I2C: SDA:21, SCL:22 14:12:21.495 -> Display support activated: Landscape 14:12:21.495 -> 64x128 text_size=1 char_w_px=6 char_h_px=8 scr_h_ch=8 scr_w_ch=21 14:12:21.495 -> Target Board = 3 ESP32 / Variant is Dev Module 14:12:21.495 -> FrSky Bluetooth In 14:12:21.495 -> Selected protocol is F.Port 2 14:12:21.495 -> headingsource = 2 FC Compass 14:12:21.495 -> Frs bluetooth master mode looking for slave name Frs2BT 14:12:22.630 -> Frs bluetooth connected! 14:12:22.663 -> EA<11<02<1F<05<67<FB<0D<6D<47<7C<00<02<3B<B0<03<E8<07<9E<EA<0C<14<C7<00<61<0A<00<08<02<DA<64<0B<E6<EA<0D<3A<EA<EE<10<00<00<75<4E<00<00<00<64<21<EA<0A<08<00<00<00<00<00<00<04<00<41<EA<0D<3A<EA<EE<10<00<00<75<4E<00<00<00<54<D7<EA<0C<14<C8<00<64<0B<00<08<02<DC<64<0A<62<EA<08<1E<00<7A<01<05<C4<36<3E<EA<0D<3A<EA<EE<10<00<00<75<4E<00<00<00<4B

There is data visble but something wrong...

zs6buj commented 3 months ago

"Selected protocol is F.Port 2"

Could you please select CRSF protocol in the config.h. If I remember correctly, it is 9

HKR1987 commented 3 months ago

if change to CRSF there it is, only warnings: 5:58:22.384 -> Starting AntTrack version:2.20.04 05:58:22.384 -> Setting up Wire I2C: SDA:21, SCL:22 05:58:22.496 -> Display support activated: Landscape 05:58:22.496 -> 64x128 text_size=1 char_w_px=6 char_h_px=8 scr_h_ch=8 scr_w_ch=21 05:58:22.496 -> Target Board = 3 ESP32 / Variant is Dev Module 05:58:22.496 -> FrSky Bluetooth In 05:58:22.496 -> Selected protocol is CRSF / ELRS 05:58:22.496 -> headingsource = 2 FC Compass 05:58:22.496 -> Testing Servos 05:58:33.011 -> Frs bluetooth master mode looking for slave name FSI6X 05:58:36.829 -> Frs bluetooth connected! 05:58:37.072 -> ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8

zs6buj commented 3 months ago

Unfortunately I'm travelling, and working from memory, but I suspect the BT option was only ever added for Frsky and Mavlink, not elrs/crsf. I need to look. Give me a few days and I'll take a look.

HKR1987 commented 3 months ago

ok, thanks

zs6buj commented 3 months ago

I've added a generic BT version for CRSF, v 20.20.05 in the BETA folder, but I'm going to need some help testing it. Here where I am I have absolutely no boards or kit to test with! You must add your information here, in config.h lies 125

#define BT_Mode  1           // Master Mode - active, initiate connection with slave (name)
//#define BT_Mode  2           // Slave Mode - passive, advertise our hostname & wait for master to connect to us
const char* BT_Slave_Name   =   "btslavename";

Also, when you must select Tools/Partition Scheme: "Minimal SPIFFS (1.9MB APP ...) in the Arduino IDE to make more space for the bluetooth code

HKR1987 commented 3 months ago

Ofcourse i will test it. So i have module HC-05 with password and im need also make some changes in AntTrack.ino:

inSerial.begin(BT_Slave_Name, true);
inSerial.setPin("1234");

and i notice problem when trying to connect with name - not working. I change to mac address:

      bool bt_connected;
      uint8_t address[6] = {0x98, 0xDA, 0x50, 0x01, 0xC9, 0xF7};
      bt_connected = inSerial.connect(address);

with FrSky is connecting without problem, but when i change to this version with CRSF i got strange problem:

09:08:14.728 -> Starting AntTrack version:2.20.05
09:08:14.728 -> Setting up Wire I2C: SDA:21, SCL:22
09:08:14.800 -> Display support activated: Landscape 
09:08:14.800 -> 64x128  text_size=1  char_w_px=6  char_h_px=8  scr_h_ch=8  scr_w_ch=21
09:08:14.800 -> Target Board = 3  ESP32 / Variant is Dev Module
09:08:14.839 -> Expecting Bluetooth In
09:08:14.839 -> Selected protocol is CRSF / ELRS
09:08:14.839 -> headingsource = 2 FC Compass
09:08:14.839 -> Bluetooth master mode, looking for slave name FSI6X
09:08:18.717 -> .ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8), in lc_task.c at line 1408.ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8), in lc_task.c at line 1408.ASSERT_WARN(1 8), in lc_task.c at line 1408ASSERT_WARN(1 8), in lc_task.c at line 1408Bluetooth NOT connected!
zs6buj commented 3 months ago

The assert warning is in one of the underlying c libraries. I would ignore it for now. The question is; why is the tracker Bluetooth failing to connect? It's not usually a source of problems.

zs6buj commented 3 months ago

I found this link to the earning message. Very interesting.

https://github.com/espressif/arduino-esp32/issues/6193

zs6buj commented 3 months ago

Screenshot_20240314_190619_GitHub.jpg

HKR1987 commented 3 months ago

Ok i will test it, but need time. Today my son born :) I check it in free time and report here

zs6buj commented 3 months ago

Congratulations my friend!

HKR1987 commented 3 months ago

finally find little free time to test it. After move closer the warning not show. Also i found some bugs: line 891: while(bt_connected). Wrong condition (without !) Also i have problem when i try connect over name. But i change a little to make connection with MAC and it worked. My changes:

  #if (Telemetry_In == 5)  // Generic BT for future
      #if (BT_Mode == 1)     // 1 master mode, connect to slave name
        log.printf("Bluetooth master mode, looking for slave name %s\n", BT_Slave_Name);          
        LogScreenPrintln("BT master cnnct");       
        inSerial.begin("Tracker", true);   
        inSerial.setPin("1234");          
      #else                  // 2 slave mode, advertise slave name
          log.printf("Bluetooth slave mode advertising slave name %s\n", mavBT_Slave_Name);            
          LogScreenPrintln("BT slave ready");   
          inSerial.begin(BT_Slave_Name);   
      #endif 

      bool bt_connected;
      uint8_t address[6] = {0x98, 0xDA, 0x50, 0x01, 0xC9, 0xF7};
      bt_connected = inSerial.connect(address);

      while(!bt_connected) {
        log.print(".");
        LogScreenPrintChar('.');  
        delay(1000);
        bt_connected = inSerial.connect(address);       
      }

      if(bt_connected) {
        btSuGood = true;
        log.println("Bluetooth connected!");
        LogScreenPrintln("BT connected!");
      } else {
        log.println("Bluetooth NOT connected!");
        LogScreenPrintln("BT NOT cnncted");    
      }
     #endif // end mavBT 

I get connection but nothing happen after this

11:25:02.640 -> Starting AntTrack version:2.20.05
11:25:02.640 -> Setting up Wire I2C: SDA:21, SCL:22
11:25:02.716 -> Display support activated: Landscape 
11:25:02.716 -> 64x128  text_size=1  char_w_px=6  char_h_px=8  scr_h_ch=8  scr_w_ch=21
11:25:02.716 -> Target Board = 3  ESP32 / Variant is Dev Module
11:25:02.749 -> Expecting Bluetooth In
11:25:02.749 -> Selected protocol is CRSF / ELRS
11:25:02.749 -> headingsource = 2 FC Compass
11:25:02.749 -> Bluetooth master mode, looking for slave name FSI6X
11:25:08.968 -> .Bluetooth connected!
zs6buj commented 2 months ago

Hello, I'm still travelling, but get back in about 10 days, and will look at this then. Thanks for the feedback.

HKR1987 commented 2 months ago

Hi, i already make PR with some changes which helps me make connection. Now i have output something like that: 14:01:20.108 -> ..... 14:03:53.231 -> Starting AntTrack version:2.20.05 14:03:53.231 -> Setting up Wire I2C: SDA:21, SCL:22 14:03:53.352 -> Display support activated: Landscape 14:03:53.352 -> 64x128 text_size=1 char_w_px=6 char_h_px=8 scr_h_ch=8 scr_w_ch=21 14:03:53.352 -> Target Board = 3 ESP32 / Variant is Dev Module 14:03:53.352 -> Expecting Bluetooth In 14:03:53.352 -> Selected protocol is CRSF / ELRS 14:03:53.352 -> headingsource = 2 FC Compass 14:03:53.352 -> Bluetooth master mode, looking for slave name btslavename 14:04:25.855 -> .Bluetooth connected! 14:05:00.628 -> terseCRSF by zs6buj version:0.00.03 14:05:00.628 -> TELEMETRY_BUILD

Now need make some test with GPS lock :) If i make something wrong with code fell free to make corrections

zs6buj commented 2 months ago

Hey, I'm back in the home office, and I can look at this today. Thanks for your work so far. I need to set up a test source of BT elrs/crsf telem.

HKR1987 commented 2 months ago

Cool :) i stop at this point and dont know whats wrong. Also i make PR to what im done to get something working

zs6buj commented 2 months ago

My Kakute-h7 flight controller has BT, but it's flashed with APM and doesn't know what to do with it. I have an HC-05 somewhere in storage, about 5km away. I'll have to search :)

zs6buj commented 1 month ago

I finally got to this. Sorry for the delay.

V2.21.00 BETA supports BT, WiFi or UART I/O for all protocols. I've tested CRSF/ELRS with BT, but from another uController, not from HC05. You might need to make your changes to support the MAC rather than slave name.

Please could you let me know how you go.

I have left these debug macros enabled in crsf.ino. You might want to comment them out later.

//=========  D E B U G   M A C R O S  ========
#define DEBUG_CRSF_GPS 
#define DEBUG_CRSF_BAT 
#define DEBUG_CRSF_ATTI
HKR1987 commented 1 month ago

Cool! Thank you. I test it and let you know :)

HKR1987 commented 1 month ago

I dont know what its wrong but in my case on terminal it stuck at TELEMETRY_BUILD and nothing happen. On lcd the is showing info but only null IMG_20240509_152355.jpg

HKR1987 commented 1 month ago

How i can test if got good crsf frame?

zs6buj commented 1 month ago

Yeah, it looks like you are not getting recognisable crsf frames, and yes, you can view incoming bytes.

First, let me say that I test with a Kakute H7 V2 running Betaflight.

image

Receiver is a CYCLONE Nano 2400RX ExpressLRS, and Transmitter/Controller is a Radiomaster TX16S with a HappyModel ES24TX Pro 2.4GHz 1000mW TX Module. This is successfully paired/(bound) and all works fine.

I take the test crsf telemetry signal off the flight controller, not the Transmitter, because the JR Bay is occupied on there, and it is more convenient to use the receiver side. Perhaps this is an issue?

image

Here the ESP32 converts the crsf telemetry to BT. I run the test Tracker firmware on a LILYGO® TTGO T-Display ESP32 1.14". Note that here we expect the CRSF signal to be inverted.

config.h line 357

bool in_invert = true;

If you are taking the crsf signal through to the transmitter, then into an HC05, perhaps the signal is idle high, or NOT inverted. So maybe try that.

If you want to print your incoming byte stream in hex, it's a little trickier. Find terseCRSF.cpp in the libraries, and on line 308 uncomment the line:

//printByte(b, ' ');

zs6buj commented 1 month ago

Update:

I added this debug macro into terseCRSF.h v0.0.4

#define SHOW_BYTE_STREAM

HKR1987 commented 1 month ago

Okey i try that :) thanks I have telemetry from inav and fc omnibus f4 pro via happymodel elrs connected to flysky i6x transmitter. And to transmitter port have connected BT module. I think this inverted option may help me... we will see

HKR1987 commented 1 month ago

ok i see the messages but something wrong. When i change to invert = false is the same. on ELRS i have selected protocol CRSF (not inverted). When i look the data its looking good. I test it when not have GPS lock - that's why it may not work? or it should show the received data (link status, voltage, altitude etc)? Here is dump from messages. i think it looking good. Could you take a look your way, what can be wrong?

08:43:32.273 -> EA 0C 14 D0 00 64 0A 00 08 02 DE 64 0B BD EA 07 21 57 41 49 54 00 AD EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 8E A1 
EA 0C 14 D0 00 64 0A 00 08 02 DE 64 0B BD EA 04 07 00 00 23 EA 0D 3A EA EE 10 00 00 75 4E FF FF FF FA EC EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E 
EA 0C 14 D0 00 64 0B 00 08 02 DF 64 09 D5 EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 23 E8 EA 0D 3A EA EE 10 00 00 75 4E FF FF F7 36 11 EA 0A 08 00 6F 00 01 00 00 00 2E ED 
EA 0C 14 D0 00 64 0B 00 08 02 D9 64 0A DF EA 0D 3A EA EE 10 00 00 75 4E 00 00 08 21 CF EA 08 1E 01 7F 01 4B DC 01 DF 
EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0B 44 EA 0D 3A EA EE 10 00 00 75 4E 00 00 01 10 BF EA 07 21 57 41 49 54 00 AD EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 8A 5F 
EA 0C 14 D0 00 64 0B 00 08 02 DC 64 0A 2F EA 04 07 00 00 23 EA 0D 3A EA EE 10 00 00 75 4E FF FF FF A2 0A EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E 
EA 0C 14 CF 00 63 0B 00 08 02 DE 64 09 C3 EA 0D 3A EA EE 10 00 00 75 4E FF FF F6 5A F4 EA 0A 08 00 6F 00 01 00 00 00 2E ED 
EA 0C 14 CF 00 63 0B 00 08 02 E3 64 0A 54 EA 0D 3A EA EE 10 00 00 75 4E 00 00 09 69 70 EA 08 1E 01 91 01 4B DB DE 4F 
EA 0C 14 D1 00 64 0B 00 08 02 E0 64 0B E6 EA 0D 3A EA EE 10 00 00 75 4E 00 00 01 BD F6 EA 07 21 57 41 49 54 00 AD 
EA 0C 14 D1 00 64 0B 00 08 02 DD 64 0C 8F EA 0D 3A EA EE 10 00 00 75 4E FF FF FF E2 97 EA 04 07 FF FF A2 EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 0B 65 
EA 0C 14 CF 00 64 0B 00 08 02 DF 64 09 5C EA 0A 08 00 6F 00 01 00 00 00 2E ED EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 50 29 
EA 0C 14 CF 00 64 0B 00 08 02 DF 64 0A F6 EA 08 1E 01 91 01 4B DB BB 5D EA 0D 3A EA EE 10 00 00 75 4E FF FF FF EC 3F 
EA 0C 14 D2 00 64 0B 00 08 02 DE 64 0B B8 EA 07 21 57 41 49 54 00 AD EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 BB 7C 
EA 0C 14 D2 00 64 0B 00 08 02 E2 64 0B 06 EA 04 07 FF FF A2 EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 0B 65 EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E 
EA 0C 14 D3 00 64 0B 00 08 02 D4 64 09 50 EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 64 21 EA 0D 3A EA EE 10 00 00 75 4E FF FF F7 A4 D3 EA 0A 08 00 6F 00 01 00 00 00 2E ED 
EA 0C 14 D3 00 64 0B 00 08 02 D8 64 0A 6F EA 0D 3A EA EE 10 00 00 75 4E 00 00 07 C9 59 EA 08 1E 01 91 01 3A DB 98 9F 
EA 0C 14 D0 00 64 0A 00 08 02 DF 64 0A EB EA 0D 3A EA EE 10 00 00 75 4E 00 00 01 4C A7 EA 07 21 57 41 49 54 00 AD
EA 0C 14 D0 00 64 0A 00 08 02 DD 64 0C B9 EA 04 07 FF FF A2 EA 0D 3A EA EE 10 00 00 75 4E FF FF FF EC 3F EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E EA 0D 3A EA EE 10 00 00 75 4E FF FF FF F2 C5 
EA 0C 14 D1 00 64 0B 00 08 02 DD 64 0A 0E EA 0A 08 00 6F 00 01 00 00 00 2E ED EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 55 02 
EA 0C 14 D1 00 64 0B 00 08 02 E0 64 0A 33 EA 08 1E 01 91 01 3A DB 87 B0 EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 58 00 EA 0D 3A EA EE 10 00 00 75 4E FF FF F7 E0 B0 
EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0B 44 EA 07 21 57 41 49 54 00 AD EA 0D 3A EA EE 10 00 00 75 4E 00 00 07 63 44 
EA 0C 14 D0 00 64 0B 00 08 02 DC 64 0B FA EA 04 07 FF FF A2 EA 0D 3A EA EE 10 00 00 75 4E 00 00 01 14 41 EA 11 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E7 00 6E 
EA 0C 14 D0 00 64 0B 00 08 02 DC 64 0A 2F EA 0D 3A EA EE 10 00 00 75 4E 00 00 00 78 A4 EA 0A 08 00 6F 00 01 00 00 01 2E E6 
zs6buj commented 1 month ago

HKR1987:

The crsf telemetry from the Betaflight flight controller looks like this:

TELEMETRY_BUILD CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 CRSF_BUF:C8 0A 08 00 00 00 00 00 00 00 00 6D CRSF_BUF:C8 07 21 41 49 52 2A 00 70 CRSF_BUF:C8 08 1E FE 5E F7 8C E8 E4 66 ...... I also do not have the GPS illuminated by the sky :(

but I'm seeing a pattern. For example, a Betaflight battery frame from the FC looks like this

C8 0A 08 00 00 00 00 00 00 00 00 6D

where the delimiter is 0xC8, length 0x0A, frame_id 0x08, payload 00 00 00 00 00 00 00 and CRC 0x6D

The payload is zeros because I have no motor battery attached.

Your similar frame looks like this:

EA 0A 08 00 6F 00 01 00 00 00 2E ED

where the delimiter appears to be 0xEA, length 0x0A(#10), payload 00 6F 00 01 00 00 00 2E, CRC 0xED

and I can see you are showing battery values.

So our frame delimiters are different.

Can you try this:

find terseCRSF.h in your library folder. Go to line 62. It looks like this

#define CRSF_TEL_SYNC_BYTE 0xC8

now change it to this:

#define CRSF_TEL_SYNC_BYTE 0xEA

build and flash, and please let me know. If this works we can create an iNav option

HKR1987 commented 1 month ago

ok, i will try it tommorow when be at home. I think that this is it :)

HKR1987 commented 1 month ago

ok, so... its working! :) obraz

only i see the problem with flight mode but i dont know if this ruin something? it show AIT? - should be WAIT...

08:56:00.875 -> Starting AntTrack version:2.21.00
08:56:00.875 -> Setting up Wire I2C: SDA:21, SCL:22
08:56:00.939 -> Display support activated: Landscape 
08:56:00.939 -> 64x128  text_size=1  char_w_px=6  char_h_px=8  scr_h_ch=8  scr_w_ch=21
08:56:01.040 -> Target Board = 3  ESP32 / Variant is Dev Module
08:56:01.078 -> Expecting Bluetooth In
08:56:01.113 -> Selected protocol is CRSF / ELRS
08:56:01.113 -> headingsource = 2 FC Compass
08:56:01.146 -> Bluetooth master mode, looking for slave name "btslavename"
08:56:01.985 -> Bluetooth connected!
08:56:02.023 -> Initialising CRSF port
08:56:02.023 -> terseCRSF by zs6buj version:0.00.03
08:56:02.023 -> TELEMETRY_BUILD
08:56:02.055 -> ATTITUDE id:1E pitch:2.0deg  roll:2.3deg  yaw:307.0deg
08:56:02.254 -> FLIGHT_MODE id:21 lth:3 AIT?
08:56:02.663 -> CRSF_GPS:02 lat:0.0000000  lon:0.0000000  ground_spd:0.0km/hr  hdg:0.00deg  alt:65535m  sats:0
08:56:02.663 -> GPS lock good! Push set-home button (pin:12) anytime to start tracking 
08:56:02.908 -> BATTERY id:08 volts:0.0  amps:0.0  Ah_drawn:256000.0  remaining:  0%
08:56:03.023 -> ATTITUDE id:1E pitch:2.0deg  roll:2.3deg  yaw:307.0deg
08:56:03.255 -> FLIGHT_MODE id:21 lth:3 AIT?

now im need test it with servo maybe in weekend i get some free time for it. So issue can be close now one more question: how i can buy you virtual coffee? :)

zs6buj commented 1 month ago

Haha. No need for coffee, but thank you. I'm pleased that it is coming together. You have helped me understand the iNav + Flysky i6x, and also we tested the BT together

The "GPS lock good" looks suspect if latitude and longitude == 0, and flight mode should be readable text. You could also check the baud. Sometimes they use 400000 b/s.

Let's keep the issue open for now.

toofen commented 3 weeks ago

I had a similar problem, the telemetry did not seem to be recognized by the tracker.

I was using a wire for the telemetry, latest Inav, latest ELRS and latest Edge-Tx on a tx16s. Using a terminal i could see that the transmitter was outputting telemetry but as i said i could not get it to be recognized by the tracker. I then edited the terseCRSF.h and changed CRSF_TEL_SYNC_BYTE to 0xEA like the example above and got it working! Some info was a bit off, like battery voltage (wrong decimal place) and amp-draw off by a factor of ten. Flightmode was also showing strange info just like above.

I have not had time to really test that everyting actually works yet but i will get to that as soon as possible, right now im just happy to get some telemetry to the tracker working after spending too many hours chasing gremlings :)

zs6buj commented 3 weeks ago

Thank you for the feedback. I think I might have fixed the flight mode. Could you ensure you use my latest versions of AntTrack and terseCRSF. They are still under BETA. I would welcome advice on the correct order if magnitude for volts and amps.

HKR1987 commented 3 weeks ago

I also notice same. Not get working tracker but i got error FC GPS Timeout. Maybe there is something cut the data and thats why is problem with flight mode, voltage and this timeouts?

toofen commented 3 weeks ago

A little more experimenting...

IMG20240608091234 Here the alt displays wrong (more on that later) also the hdg shows wrong on the display. IMG20240608091309 Here you can seethat the volage and amp draw shows of by a factor of 10 IMG20240608092133 IMG20240608092201 Moved the airplane to see if the alt reading was wrong due to it showing minus -0.1 and its definetely better now. Interetingly the values that i get in Serial Monitor is spot on including heading (but still shows wrong on the display) so i guess its just showing the wrong values on the display, except for CRSF cario that shows just HEX values.

Dont know if this info is of any use, bear in mind im just a happy thinkerer and no programmer :)

zs6buj commented 3 weeks ago

Yes, this is great info, thank you!

"Moved the airplane to see if the alt reading was wrong due to it showing minus -0.1"

Yeah, what happens here is this: Once we have "home" altitude and the GPS alt drifts a little due to accuracy tolerance, our calc for alt above field can go negative. I should show negative numbers properly there.

I will try to look at this today, but wife has things arranged, lol.

zs6buj commented 3 weeks ago

I also notice same. Not get working tracker but i got error FC GPS Timeout. Maybe there is something cut the data and thats why is problem with flight mode, voltage and this timeouts?

Thanks. Could you please give me details. Versions, log, anything else.

toofen commented 3 weeks ago

I was going to edit my original post but you were quick to respond! I also have some GPS Timeouts but the info still seems to get thru so i dont know what it could be, i will try to experiment a little more later and see if i can dig up something more. All right now tested with latest Beta anttracker and the latest TerseCRSF (i missed that bit in my first post), its hard to keep up with everyting :)