Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32 with Bluetooth telemetry #66

Open
HKR1987 opened this issue Mar 10, 2024 · 58 comments
Open

Esp32 with Bluetooth telemetry #66

HKR1987 opened this issue Mar 10, 2024 · 58 comments

Comments

@HKR1987
Copy link

HKR1987 commented Mar 10, 2024

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
Copy link
Owner

zs6buj commented Mar 10, 2024

"Selected protocol is F.Port 2"

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

@HKR1987
Copy link
Author

HKR1987 commented Mar 11, 2024

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
Copy link
Owner

zs6buj commented Mar 11, 2024

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
Copy link
Author

HKR1987 commented Mar 11, 2024

ok, thanks

@zs6buj
Copy link
Owner

zs6buj commented Mar 12, 2024

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
Copy link
Author

HKR1987 commented Mar 12, 2024

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
Copy link
Owner

zs6buj commented Mar 14, 2024

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
Copy link
Owner

zs6buj commented Mar 14, 2024

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

espressif/arduino-esp32#6193

@zs6buj
Copy link
Owner

zs6buj commented Mar 14, 2024

Screenshot_20240314_190619_GitHub.jpg

@HKR1987
Copy link
Author

HKR1987 commented Mar 14, 2024

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

@zs6buj
Copy link
Owner

zs6buj commented Mar 14, 2024

Congratulations my friend!

@HKR1987
Copy link
Author

HKR1987 commented Mar 29, 2024

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
Copy link
Owner

zs6buj commented Apr 10, 2024

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

@HKR1987
Copy link
Author

HKR1987 commented Apr 12, 2024

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
Copy link
Owner

zs6buj commented Apr 30, 2024

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
Copy link
Author

HKR1987 commented Apr 30, 2024

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

@zs6buj
Copy link
Owner

zs6buj commented Apr 30, 2024

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
Copy link
Owner

zs6buj commented May 8, 2024

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
Copy link
Author

HKR1987 commented May 8, 2024

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

@HKR1987
Copy link
Author

HKR1987 commented May 10, 2024

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
Copy link
Author

HKR1987 commented May 12, 2024

How i can test if got good crsf frame?

@zs6buj
Copy link
Owner

zs6buj commented May 13, 2024

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
Copy link
Owner

zs6buj commented May 13, 2024

Update:

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

#define SHOW_BYTE_STREAM

@HKR1987
Copy link
Author

HKR1987 commented May 13, 2024

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
Copy link
Author

HKR1987 commented May 14, 2024

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
Copy link
Owner

zs6buj commented May 14, 2024

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
Copy link
Author

HKR1987 commented May 14, 2024

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

@HKR1987
Copy link
Author

HKR1987 commented May 15, 2024

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
Copy link
Owner

zs6buj commented May 15, 2024

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
Copy link

toofen commented Jun 7, 2024

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
Copy link
Owner

zs6buj commented Jun 7, 2024

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
Copy link
Author

HKR1987 commented Jun 7, 2024

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
Copy link

toofen commented Jun 8, 2024

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
Copy link
Owner

zs6buj commented Jun 8, 2024

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
Copy link
Owner

zs6buj commented Jun 8, 2024

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
Copy link

toofen commented Jun 8, 2024

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 :)

@zs6buj
Copy link
Owner

zs6buj commented Jul 1, 2024

I have posted V 2.21.07 |(under release_candidate) with fixes and some new features. Please could you check it when you get the chance.

@zs6buj
Copy link
Owner

zs6buj commented Jul 1, 2024

Also check out https://github.com/zs6buj/CRSF_Utlilties where you will find three utilities for CRSF to send telemetry from uart to UDP or BT, and read UDP. The utilities work with AntTrack.

@HKR1987
Copy link
Author

HKR1987 commented Jul 1, 2024

Cool! i will test when had some free time and let you know

@toofen
Copy link

toofen commented Jul 5, 2024

It compiles without problems but sadly i seem to have fried my t-display unit somewhere along the way so i cant test it on the hardware right now, i ordered some new units and i will get back to testing as soon as they come in.

@HKR1987
Copy link
Author

HKR1987 commented Jul 7, 2024

I test version 2.21.07 and it wont work
on screen and uart output i have good position but tracker dont want turn around and tracking.
on screen i also noticed some errors with gps timeout
screen_tracker

here is logs from uart (gps data is anonimized but it looks good for me - show correct location)
Altitude wont work below 0 and show 65535m

18:14:32.636 -> Starting antTrack version:2.21.07
18:14:32.636 -> Setting up Wire I2C: SDA:21, SCL:22
18:14:32.636 -> Display support activated: Landscape 
18:14:32.636 -> 64x128  text_size=1  char_w_px=6  char_h_px=8  scr_h_ch=8  scr_w_ch=21
18:14:32.701 -> Target Board = 3  ESP32 / Variant is Dev Module
18:14:32.733 -> Expecting Bluetooth In
18:14:32.774 -> Selected protocol is CRSF
18:14:32.774 -> headingsource = 2 FC Compass
18:14:32.809 -> Testing Servos
18:14:43.353 -> Bluetooth master mode, looking for slave name "btslavename"
18:14:44.468 -> Bluetooth connected!
18:14:44.500 -> terseCRSF by zs6buj version:0.00.06
18:14:44.500 -> Telemetry Build. Expected source is EdgeTX/OpenTX
18:14:44.536 -> Good BT data stream
18:14:44.577 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0D 2B 
18:14:44.577 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3371000.0  remaining: 43%
18:14:44.614 -> CRSF_BUF:len:13:EA 0C 14 CB 00 64 0B 00 08 02 D1 64 0A 
18:14:44.797 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0D 17 
18:14:44.797 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:19.0deg
18:14:44.797 -> CRSF_BUF:len:13:EA 0C 14 CB 00 64 0B 00 08 02 D1 64 0A 
18:14:45.012 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:45.012 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:45.092 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0B 00 08 02 D5 64 0C 
18:14:45.175 -> CRSF_BUF:len: 5:EA 04 07 FF F8 
18:14:45.207 -> CF_VARIO:len: 5:EA 04 07 FF F8 
18:14:45.278 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 00 17 5C 03 E7 0E 
18:14:45.278 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.0km/hr  hdg:59.80deg  alt:65535m  sats:14  gpsfixGood:1
18:14:45.278 -> GPS lock good! Push set-home button (pin:12) anytime to start tracking 
18:14:45.421 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0B 00 08 02 D4 64 0A 
18:14:45.522 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:45.522 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:45.629 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D3 64 0B 
18:14:45.708 -> ASSERT_WARN(1 8), in lc_task.c at line 1408CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0D 17 
18:14:45.779 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:19.0deg
18:14:45.822 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D9 64 0A 
18:14:46.012 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:46.012 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:46.012 -> gpsGood:1  gpsfixGood:1  lonGood:1  latGood:1  altGood:1  hdgGood:1  boxhdgGood:0 
18:14:46.012 -> Good flight computer GPS lock
18:14:46.079 -> CRSF_BUF:len:13:EA 0C 14 C9 00 64 0B 00 08 02 D9 64 0B 
18:14:46.079 -> CRSF_BUF:len: 5:EA 04 07 FF F8 
18:14:46.079 -> CF_VARIO:len: 5:EA 04 07 FF F8 
18:14:46.221 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 01 17 5C 03 E7 0E 
18:14:46.221 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.1km/hr  hdg:59.80deg  alt:65535m  sats:14  gpsfixGood:1
18:14:46.360 -> CRSF_BUF:len:13:EA 0C 14 C9 00 64 0B 00 08 02 D6 64 0B 
18:14:46.478 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:46.478 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:46.605 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D7 64 0A 
18:14:46.712 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 01 05 0D 05 
18:14:46.712 -> ATTITUDE id:1E pitch:4.4deg  roll:1.5deg  yaw:19.0deg
18:14:46.776 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D5 64 0A 
18:14:46.812 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:46.812 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:46.976 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D9 64 0B 
18:14:46.976 -> CRSF_BUF:len: 5:EA 04 07 FF F8 
18:14:46.976 -> CF_VARIO:len: 5:EA 04 07 FF F8 
18:14:47.252 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 03 17 5C 03 E7 0E 
18:14:47.252 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.3km/hr  hdg:59.80deg  alt:65535m  sats:14  gpsfixGood:1
18:14:47.362 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0B 00 08 02 D5 64 0A 
18:14:47.402 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:47.402 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:47.544 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0A 00 08 02 D0 64 0A 
18:14:47.576 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0D 05 
18:14:47.576 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:19.0deg
18:14:47.757 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0A 00 08 02 D1 64 0A 
18:14:47.829 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:47.829 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:47.962 -> CRSF_BUF:len:13:EA 0C 14 C9 00 64 0A 00 08 02 D4 64 0B 
18:14:47.994 -> CRSF_BUF:len: 5:EA 04 07 FF F8 
18:14:47.994 -> CF_VARIO:len: 5:EA 04 07 FF F8 
18:14:47.994 -> ASSERT_WARN(1 8), in lc_task.c at line 1408CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 01 17 5C 03 E7 0E 
18:14:48.173 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.1km/hr  hdg:59.80deg  alt:65535m  sats:14  gpsfixGood:1
18:14:48.211 -> CRSF_BUF:len:13:EA 0C 14 C9 00 64 0A 00 08 02 D8 64 0A 
18:14:48.395 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:48.395 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:48.395 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 09 00 08 02 D2 64 0B 
18:14:48.578 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0D 05 
18:14:48.578 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:19.0deg
18:14:48.661 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 09 00 08 02 D9 64 09 
18:14:48.860 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:48.860 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:48.896 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0A 00 08 02 DA 64 0A 
18:14:49.061 -> CRSF_BUF:len: 5:EA 04 07 FF F9 
18:14:49.061 -> CF_VARIO:len: 5:EA 04 07 FF F9 
18:14:49.096 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 01 17 5C 03 E7 0E 
18:14:49.136 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.1km/hr  hdg:59.80deg  alt:65535m  sats:14  gpsfixGood:1
18:14:49.237 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 0A 00 08 02 D3 64 0A 
18:14:49.343 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:49.387 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:49.454 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 09 00 08 02 D5 64 0B 
18:14:49.611 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0C F4 
18:14:49.611 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:18.0deg
18:14:49.642 -> CRSF_BUF:len:13:EA 0C 14 CA 00 64 09 00 08 02 D3 64 0A 
18:14:49.839 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:49.839 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:49.839 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0A 00 08 02 DA 64 0A 
18:14:50.072 -> CRSF_BUF:len: 5:EA 04 07 FF F9 
18:14:50.072 -> CF_VARIO:len: 5:EA 04 07 FF F9 
18:14:50.072 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 03 17 5C 03 E7 0F 
18:14:50.072 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.3km/hr  hdg:59.80deg  alt:65535m  sats:15  gpsfixGood:1
18:14:50.218 -> CRSF_BUF:len:13:EA 0C 14 C8 00 64 0A 00 08 02 D4 64 0B 
18:14:50.250 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:50.287 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:50.325 -> ASSERT_WARN(1 8), in lc_task.c at line 1408CRSF_BUF:len:13:EA 0C 14 C9 00 64 0A 00 08 02 CF 64 0B 
18:14:50.472 -> CRSF_BUF:len: 9:EA 08 1E 02 FF 00 F4 0C F4 
18:14:50.472 -> ATTITUDE id:1E pitch:4.4deg  roll:1.4deg  yaw:18.0deg
18:14:50.589 -> CRSF_BUF:len:13:EA 0C 14 C9 00 64 0A 00 08 02 D5 64 0A 
18:14:50.761 -> CRSF_BUF:len: 6:EA 05 21 4F 4B 00 
18:14:50.761 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:14:50.827 -> CRSF_BUF:len:13:EA 0C 14 CC 00 64 0A 00 08 02 D7 64 0B 
18:14:50.960 -> CRSF_BUF:len: 5:EA 04 07 FF F9 
18:14:50.960 -> CF_VARIO:len: 5:EA 04 07 FF F9 
18:14:51.027 -> CRSF_BUF:len:18:EA 11 02 22 22 22 22 22 22 22 22 00 00 17 5C 03 E7 0F 
18:14:51.027 -> CRSF_GPS:02 lat:52.2222222  lon:22.2222222  ground_spd:0.0km/hr  hdg:59.80deg  alt:65535m  sats:15  gpsfixGood:1
18:14:51.169 -> CRSF_BUF:len:13:EA 0C 14 CC 00 64 0A 00 08 02 DC 64 09 
18:14:51.240 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0E 2B 
18:14:51.240 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%
18:14:51.394 -> CRSF_BUF:len:13:EA 0C 14 CE 00 64 0B 00 08 02 D9 64 0C 
...
...
...
18:15:17.123 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.123 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.155 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.188 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.188 -> CRSF_BUF:len:11:EA 0A 08 00 6E 00 01 00 00 0F 2B 
18:15:17.188 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3883000.0  remaining: 43%
18:15:17.188 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.188 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.188 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.188 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.220 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.251 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored
18:15:17.251 ->  Bad alt! cur.alt=0 hom.alt=65535  Packet ignored

@zs6buj
Copy link
Owner

zs6buj commented Jul 8, 2024

Ok, thanks. Did you do this?

18:14:45.278 -> GPS lock good! Push set-home button (pin:12) anytime to start tracking

This is a requirement if you are using :

18:14:32.774 -> headingsource = 2 FC Compass

Point the 'plane/drone in the default tracking direction, and tracker stores the FC compass reading as "home" direction

Not sure why no display tho

@HKR1987
Copy link
Author

HKR1987 commented Jul 8, 2024

i dont remember if i push the button with this test but if i have this:
#define home_decay_secs 60
it should set after 60 seconds...?
the display show correct coordinates but sometimes start showing errors like above

@zs6buj
Copy link
Owner

zs6buj commented Jul 8, 2024

#define home_decay_secs 60

This is something else, to do with when I write info to eeprom.

"the display show correct coordinates but sometimes start showing errors like above"

This is being caused by the long delay between GPS messages from Edge/TC box. There are many link statistics messages, and the GPS messages time out. You can change

const uint8_t timeout_secs = 8;

@HKR1987
Copy link
Author

HKR1987 commented Jul 8, 2024

18:14:51.240 -> BATTERY id:08 volts:110.0  amps:1.0  Ah_drawn:3627000.0  remaining: 43%

volatge, amps and ah_drawn also looking wrong

@zs6buj
Copy link
Owner

zs6buj commented Jul 8, 2024

Yeah, I see that. Divided V and A by 10, and MhA by 1E3. Please could you try terseCRSF lib v0.0.7 when you get the chance.

@HKR1987
Copy link
Author

HKR1987 commented Jul 8, 2024

Ofcourse i will test it and back with results

@toofen
Copy link

toofen commented Jul 9, 2024

So...I have it mostly sort of working now, on a newer Lilygo T-display-S3 of all things. Like i said i fried my original T-display and had a s3 laying unused so i gave it a go and with a bit of tinkering i got i working, its right now a bit of a botch job changing the existing parameters for the T2 until i got it working.

I could not use the bluetooth connection due to it being only Bluetooth LE but i got the display working and it receiving telemetry thru UART. The only issue i have now is that i cant get my servos working. I had exactly the same problem with my original T-display before i fried it, and any pointers would be very helpful.

Edit:
a little more digging and troublehooting...this shows up in the output:

Servo write az=90 el=0
E (2595) ledc: ledc_set_duty(720): LEDC is not initialized
E (2595) ledc: ledc_update_duty(648): LEDC is not initialized
E (2595) ledc: ledc_set_duty(720): LEDC is not initialized
E (2600) ledc: ledc_update_duty(648): LEDC is not initialized

@zs6buj
Copy link
Owner

zs6buj commented Jul 10, 2024

Thanks for the test. Make sure you power the servos separately from the ESP32. I use a separate 5V regulator. Don't use the 5v pin on the esp32, it burns the voltage reg on the board, or burns off the trace. I'm not sure what the LEDC thing is. I'll try to look later.

@toofen
Copy link

toofen commented Jul 10, 2024

Thanks for the test. Make sure you power the servos separately from the ESP32. I use a separate 5V regulator. Don't use the 5v pin on the esp32, it burns the voltage reg on the board, or burns off the trace. I'm not sure what the LEDC thing is. I'll try to look later.

Yes i have a separate bec for the servos.I also measured the output using i Lipo charger i have that can measure PWM signals and it shows nothing. Im pretty sure that it doesnt output any pwm signal. Based on some limited googling and guesses i think the LEDC problem and me not getting any pwm out is related, something with timers used to generate the pwm signal, but all the info i found went way over my knowledge level :)

@HKR1987
Copy link
Author

HKR1987 commented Jul 10, 2024

@toofen what esp variant you have in config? 5 or 6?

@toofen
Copy link

toofen commented Jul 11, 2024

@toofen what esp variant you have in config? 5 or 6?

Right now im using a modified version of 6. I had to modify option 6 to get it working with my Lilygo T-Display-S3

@zs6buj
Copy link
Owner

zs6buj commented Jul 12, 2024

The datsheet says you can map any pins for motor control PWM. https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf

image

3.5.13 Motor Control PWM (MCPWM)
ESP32-S3 integrates two MCPWM that can be used to drive digital motors and smart light. Each MCPWM
peripheral has one clock divider (prescaler), three PWM timers, three PWM operators, and a capture module.
PWM timers are used for generating timing references. The PWM operators generate desired waveform based
on the timing references. Any PWM operator can be configured to use the timing references of any PWM timers.
Different PWM operators can use the same PWM timer’s timing references to produce related PWM signals.
PWM operators can also use different PWM timers’values to produce the PWM signals that work alone.
Different PWM timers can also be synchronized together

I used these pin for another project, but no specific PWM signals.

 #if (ESP32_Variant == 8)          
/* 
  Lilygo T-Display-S3 ESP32-S3 1.9 in ST7789V LCD no touch screen    
  FC from wifi, mav and s.port to GCS
  see C:\Users\erics\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\variants\lilygo_t_display_s3\pins_arduino.h                                
  uart0(flash & monitor), uart1 and uart2(map pins)   
  static const uint8_t TX = 43;       // u0txd default
  static const uint8_t RX = 44;       // u0rxd
*/
    #define MavStatusLed     1        // No onboard LED, choose a GPIO
    #define InvertMavLed   false     
    #define BufStatusLed    -1        // none  
    #define fc_rxPin        16        // u2rxd - map a spare pin
    #define fc_txPin        21        // u2txd - map a spare pin
    #define fr_rxPin        18        // FPort u1rxd - map a spare pin
    #define fr_txPin        17        // FPort u1txd - map a spare pin
    #define sbus_rxPin      -1        // not used - don't care
    #define sbus_txPin      -1        // not used
    #define startWiFiPin    -1        // not used
    #define resetEepromPin  -1        // not used  non digital touch pin  
    #define gs_rxPin        18        // GCS u1rxd default pins, still mapped
    #define gs_txPin        17        // GCS u1txd default pins, still mapped
    #if !defined displaySupport       // I2C OLED board is built into Heltec WiFi Kit 32
      #define displaySupport
    #endif  
    #define ST7789V_Display         // 170 x 320 dot 262K Color TFT LCD
    #define SCR_ORIENT   1          // 1 Landscape or 0 Portrait 
    /* Below please choose either Touch pin-pair or Digital pin-pair for display scrolling
     *  Pin == -1 means the pin-pair is not used
     */ 
    #define Pup            0        // "BUTTON_1" to scroll the display up     LOW=Press
    #define Pdn           14        // "BUTTON_2" to scroll the display down   LOW=Press   
    #define Tup           -1        // 33 Touch pin to scroll the display up
    #define Tdn           -1        // 32 Touch pin to scroll the display down   
    //#define TOUCH_CS       3      // LCD is not touch screen
    
    /*  
     Apparently unused pins right now 
                        01
                        02
                        03
                        10
                        11X
                        12X
                        13
                        16X
                        21X
                        43 u0txd default
                        44 u0rxd default
       
     ST7789V Display reserved pins
      LCD_Power_on      15
      LCD_BL            38 Backlight
      LCD_D0            39
      LCD_D1            40 
      LCD_D2            41
      LCD_D3            42
      LCD_D4            45 
      LCD_D5            46
      LCD_D6            47
      LCD_D7            48
      LCD_WR            08
      LCD_RD            09
      LCD_DC            07
      LCD_CS            06
      LCD_RES           05                 
    */
  #endif  

@zs6buj
Copy link
Owner

zs6buj commented Jul 12, 2024

You could also search to pdf for "LED PWM"

@toofen
Copy link

toofen commented Jul 12, 2024

after loads of reading and scratching my head i managed to get the LEDC error to go away. It was due to me using ESP version 2.0.14 due to TFT_eSPI not working on any higher version, but i found a work-around for that in Bodmer/TFT_eSPI#3355 (comment)

and using that in combination with updating ESP to version 3.0.2 made the LEDC errors go away. I still cant get my servos to work but now i have something to work with at least.

Starting antTrack version:2.21.07
Display support activated: Landscape
170x320 text_size=2 char_w_px=12 char_h_px=16 scr_h_ch=10 scr_w_ch=26
Target Board = 3 ESP32 / Variant is LILYGO® TTGO T2 ESP32 OLED SD
Expecting UART Telemetry In
Selected protocol is CRSF
headingsource = 1 FC GPS
moveServos() az=90 el=0
Servo write az=90 el=0
Servo write az=90 el=0
moveServos() az=90 el=90
Servo write az=90 el=90
moveServos() az=90 el=180
Servo write az=90 el=180
moveServos() az=90 el=0
Servo write az=90 el=0
moveServos() az=180 el=0
Servo write az=180 el=0
moveServos() az=90 el=0
Servo write az=90 el=0
moveServos() az=90 el=0
Servo write az=90 el=0
inSerial baud:115200 rxPin:17 txPin:18 invert:0
terseCRSF by zs6buj version:0.00.06
Telemetry Build. Expected source is EdgeTX/OpenTX

@zs6buj
Copy link
Owner

zs6buj commented Jul 13, 2024

Good work, and thanks for the feedback!

@HKR1987
Copy link
Author

HKR1987 commented Jul 15, 2024

ok i make test again with push home button. Version 2.21.07 (terseCRSF v0.0.7)
The values looks good, but tracker wont track. I have set flag TEST_SERVOS and on starup my servos working.
After push home button nothing more is happen. What else can i check to find problem?
There is also sometimes show FC GPS timeout.

test2_1
test2_2

18:23:42.504 -> Starting antTrack version:2.21.07
18:23:42.504 -> Setting up Wire I2C: SDA:21, SCL:22
18:23:42.504 -> Display support activated: Landscape 
18:23:42.504 -> 64x128  text_size=1  char_w_px=6  char_h_px=8  scr_h_ch=8  scr_w_ch=21
18:23:42.578 -> Target Board = 3  ESP32 / Variant is Dev Module
18:23:42.643 -> Expecting Bluetooth In
18:23:42.643 -> Selected protocol is CRSF
18:23:42.679 -> headingsource = 2 FC Compass
18:23:42.679 -> Testing Servos
18:23:53.201 -> Bluetooth master mode, looking for slave name "btslavename"
18:23:56.738 -> Bluetooth connected!
18:23:56.823 -> terseCRSF by zs6buj version:0.00.07
18:23:56.823 -> Telemetry Build. Expected source is EdgeTX/OpenTX
18:23:56.823 -> Good BT data stream
18:23:56.857 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 E2 64 0B 
18:23:57.006 -> CRSF_BUF:EA 04 07 FF FF 
18:23:57.006 -> CF_VARIO:EA 04 07 FF FF 
18:23:57.123 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 E1 64 0B 
18:23:57.153 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 02 32 64 03 E7 11 
18:23:57.153 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.2km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:23:57.189 -> GPS lock good! Push set-home button (pin:12) anytime to start tracking 
18:23:57.296 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:23:57.296 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:23:57.296 -> CRSF_BUF:EA 0C 14 D3 00 64 0B 00 08 02 E1 64 0A 
18:23:57.507 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F E1 
18:23:57.545 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:23:57.545 -> CRSF_BUF:EA 0C 14 D3 00 64 0B 00 08 02 E0 64 0A 
18:23:57.729 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:23:57.729 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:23:57.729 -> gpsGood:1  gpsfixGood:1  lonGood:1  latGood:1  altGood:1  hdgGood:1  boxhdgGood:0 
18:23:57.729 -> Good flight computer GPS lock
18:23:57.808 -> CRSF_BUF:EA 0C 14 CF 00 63 0B 00 08 02 E2 64 0C 
18:23:57.889 -> ASSERT_WARN(1 8), in lc_task.c at line 1409CRSF_BUF:EA 04 07 FF FF 
18:23:57.922 -> CF_VARIO:EA 04 07 FF FF 
18:23:57.991 -> CRSF_BUF:EA 0C 14 CF 00 63 0B 00 08 02 CA 64 0B 
18:23:58.101 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 01 32 64 03 E7 11 
18:23:58.139 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.1km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:23:58.212 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:23:58.212 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:23:58.347 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 DB 64 09 
18:23:58.451 -> CRSF_BUF:EA 08 1E 00 45 FF BB 3F E1 
18:23:58.451 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.4deg  yaw:93.0deg
18:23:58.521 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 E0 64 0A
18:23:58.738 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:23:58.738 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:23:58.738 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 DF 64 0B 
18:23:58.923 -> CRSF_BUF:EA 04 07 00 00 
18:23:58.923 -> CF_VARIO:EA 04 07 00 00 
18:23:58.962 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 D9 64 0B 
18:23:59.115 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 01 32 64 03 E7 11 
18:23:59.115 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.1km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:23:59.189 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:23:59.189 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:23:59.382 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 D0 64 0A 
18:23:59.414 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F E1 
18:23:59.414 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:23:59.539 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 D5 64 0A 
18:23:59.672 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:23:59.672 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:23:59.738 -> CRSF_BUF:EA 0C 14 CC 00 64 0B 00 08 02 E0 64 0B 
18:23:59.915 -> CRSF_BUF:EA 04 07 00 00 
18:23:59.915 -> CF_VARIO:EA 04 07 00 00 
18:23:59.982 -> CRSF_BUF:EA 0C 14 CC 00 64 0B 00 08 02 E0 64 0D 
18:23:59.982 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 00 32 64 03 E7 11 
18:23:59.982 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.0km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:24:00.183 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:00.183 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:00.334 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DF 64 0A 
18:24:00.334 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F D0 
18:24:00.373 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:00.373 -> ASSERT_WARN(1 8), in lc_task.c at line 1409CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DF 64 0A 
18:24:00.553 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:00.553 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:00.699 -> CRSF_BUF:EA 0C 14 CD 00 63 0B 00 08 02 E0 64 0B 
18:24:00.738 -> CRSF_BUF:EA 04 07 00 01 
18:24:00.738 -> CF_VARIO:EA 04 07 00 01 
18:24:00.888 -> CRSF_BUF:EA 0C 14 CD 00 63 0B 00 08 02 C7 64 0C 
18:24:00.954 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 00 32 64 03 E7 11 
18:24:00.954 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.0km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:24:01.105 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:01.105 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:01.222 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DE 64 0A 
18:24:01.370 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F D0 
18:24:01.370 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:01.405 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DE 64 0A 
18:24:01.570 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:01.570 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:01.648 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 E0 64 0B 
18:24:01.823 -> CRSF_BUF:EA 04 07 00 01 
18:24:01.823 -> CF_VARIO:EA 04 07 00 01 
18:24:01.856 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 D8 64 0A 
18:24:02.044 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 02 32 64 03 E8 11 
18:24:02.044 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.2km/hr  hdg:129.00deg  alt:0m  sats:17  gpsfixGood:1
18:24:02.080 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:02.080 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:02.232 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 E0 64 0A 
18:24:02.305 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F D0 
18:24:02.305 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:02.453 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DF 64 0A 
18:24:02.453 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:02.453 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:02.453 -> gpsGood:0  gpsfixGood:1  lonGood:1  latGood:1  altGood:0  hdgGood:1  boxhdgGood:0 
18:24:02.453 -> Flight Computer GPS timeout *********
18:24:02.633 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0B 
18:24:02.633 -> CRSF_BUF:EA 04 07 00 01 
18:24:02.633 -> CF_VARIO:EA 04 07 00 01 
18:24:02.820 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 DF 64 0A 
18:24:02.820 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 00 32 64 03 E8 11 
18:24:02.859 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.0km/hr  hdg:129.00deg  alt:0m  sats:17  gpsfixGood:1
18:24:02.859 -> ASSERT_WARN(1 8), in lc_task.c at line 1409CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:03.048 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:03.048 -> Static home location set to Lat = 52.1234567 Lon = 22.1234567 Alt = 0 Hdg = 93
18:24:03.187 -> CRSF_BUF:EA 0C 14 D1 00 63 0B 00 08 02 DE 64 0A 
18:24:03.255 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F E1 
18:24:03.302 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:03.388 -> CRSF_BUF:EA 0C 14 D1 00 63 0B 00 08 02 DE 64 0B 
18:24:03.528 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:03.528 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:03.564 -> CRSF_BUF:EA 0C 14 CF 00 61 0B 00 08 02 E0 64 0B 
18:24:03.755 -> CRSF_BUF:EA 04 07 00 00 
18:24:03.755 -> CF_VARIO:EA 04 07 00 00 
18:24:03.795 -> CRSF_BUF:EA 0C 14 CF 00 61 0B 00 08 02 CD 64 0C 
18:24:03.902 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 01 32 64 03 E8 11 
18:24:03.936 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.1km/hr  hdg:129.00deg  alt:0m  sats:17  gpsfixGood:1
18:24:03.968 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:03.968 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:04.138 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 DE 64 0A 
18:24:04.221 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F E1 
18:24:04.221 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:04.291 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 DE 64 0A 
18:24:04.483 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:04.483 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:04.568 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 E0 64 0B 
18:24:04.669 -> CRSF_BUF:EA 04 07 00 00 
18:24:04.669 -> CF_VARIO:EA 04 07 00 00 
18:24:04.778 -> CRSF_BUF:EA 0C 14 CD 00 64 0B 00 08 02 DA 64 0B 
18:24:04.970 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 00 32 64 03 E8 11 
18:24:04.970 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.0km/hr  hdg:129.00deg  alt:0m  sats:17  gpsfixGood:1
18:24:04.970 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:04.970 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:05.126 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 E0 64 0A 
18:24:05.126 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F F3 
18:24:05.164 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:05.229 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 DF 64 0A 
18:24:05.264 -> ASSERT_WARN(1 8), in lc_task.c at line 1409CRSF_BUF:EA 05 21 4F 4B 00 
18:24:05.448 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:05.520 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0B 
18:24:05.639 -> CRSF_BUF:EA 04 07 FF FE 
18:24:05.639 -> CF_VARIO:EA 04 07 FF FE 
18:24:05.711 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 DE 64 0C 
18:24:05.818 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 01 32 64 03 E7 11 
18:24:05.818 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.1km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:24:05.895 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:05.930 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:06.080 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DE 64 0A 
18:24:06.080 -> CRSF_BUF:EA 08 1E 00 45 FF A9 3F D0 
18:24:06.115 -> ATTITUDE id:1E pitch:0.4deg  roll:-0.5deg  yaw:93.0deg
18:24:06.297 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DE 64 0A 
18:24:06.297 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:06.297 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:06.330 -> gpsGood:1  gpsfixGood:1  lonGood:1  latGood:1  altGood:1  hdgGood:1  boxhdgGood:0 
18:24:06.330 -> Good flight computer GPS lock
18:24:06.469 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 E0 64 0C 
18:24:06.469 -> CRSF_BUF:EA 04 07 FF FD 
18:24:06.469 -> CF_VARIO:EA 04 07 FF FD 
18:24:06.650 -> CRSF_BUF:EA 0C 14 CF 00 64 0B 00 08 02 CA 64 0C 
18:24:06.682 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 02 32 64 03 E7 0E 
18:24:06.713 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.2km/hr  hdg:129.00deg  alt:-1m  sats:14  gpsfixGood:1
18:24:06.865 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:06.865 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:06.910 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DE 64 0A 
18:24:07.106 -> CRSF_BUF:EA 08 1E 00 57 FF BB 3F D0 
18:24:07.106 -> ATTITUDE id:1E pitch:0.5deg  roll:-0.4deg  yaw:93.0deg
18:24:07.179 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DE 64 0B 
18:24:07.335 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:07.335 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:07.335 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 E0 64 0A 
18:24:07.547 -> CRSF_BUF:EA 04 07 FF FC 
18:24:07.582 -> CF_VARIO:EA 04 07 FF FC 
18:24:07.619 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 DC 64 0C 
18:24:07.652 -> ASSERT_WARN(1 8), in lc_task.c at line 1409CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 00 32 64 03 E7 11 
18:24:07.768 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.0km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:24:07.834 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:07.834 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:07.979 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0A 
18:24:08.051 -> CRSF_BUF:EA 08 1E 00 57 FF BB 3F E1 
18:24:08.093 -> ATTITUDE id:1E pitch:0.5deg  roll:-0.4deg  yaw:93.0deg
18:24:08.196 -> CRSF_BUF:EA 0C 14 D0 00 64 0B 00 08 02 E0 64 0A 
18:24:08.336 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:08.336 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:08.371 -> CRSF_BUF:EA 0C 14 D1 00 63 0B 00 08 02 E0 64 0A 
18:24:08.559 -> CRSF_BUF:EA 04 07 FF FC 
18:24:08.559 -> CF_VARIO:EA 04 07 FF FC 
18:24:08.559 -> CRSF_BUF:EA 0C 14 D1 00 63 0B 00 08 02 DF 64 0B 
18:24:08.783 -> CRSF_BUF:EA 11 02 12 34 56 78 12 34 56 78 00 01 32 64 03 E7 11 
18:24:08.783 -> CRSF_GPS:02 lat:52.1234567  lon:22.1234567  ground_spd:0.1km/hr  hdg:129.00deg  alt:-1m  sats:17  gpsfixGood:1
18:24:08.783 -> CRSF_BUF:EA 0A 08 00 6D 00 01 00 00 0D 28 
18:24:08.783 -> BATTERY id:08 volts:10.9  amps:0.1  Ah_drawn:3368.0  remaining: 40%
18:24:08.783 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DF 64 0A 
18:24:08.980 -> CRSF_BUF:EA 08 1E 00 57 FF BB 3F E1 
18:24:08.980 -> ATTITUDE id:1E pitch:0.5deg  roll:-0.4deg  yaw:93.0deg
18:24:09.164 -> CRSF_BUF:EA 0C 14 D1 00 64 0B 00 08 02 DE 64 0A 
18:24:09.164 -> CRSF_BUF:EA 05 21 4F 4B 00 
18:24:09.164 -> FLIGHT_MODE id:21 lth:2 OK�? motArmed:0
18:24:09.345 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 E0 64 0A 
18:24:09.345 -> CRSF_BUF:EA 04 07 FF FB 
18:24:09.345 -> CF_VARIO:EA 04 07 FF FB 
18:24:09.562 -> CRSF_BUF:EA 0C 14 CE 00 64 0B 00 08 02 CB 64 0C 

@zs6buj
Copy link
Owner

zs6buj commented Jul 16, 2024

Since we see this:

Static home location set to Lat = 52.1234567 Lon = 22.1234567 Alt = 0 Hdg = 93

we should start tracking provided that the 'plane/drone has moved more than minDist, which is presently 4m. I can't see from the logs if latitude or longitude have changed.

For debugging I recommend that you activate these macros in debug.h

#define DEBUG_AzEl
#define DEBUG_Servos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants