Search found 72 matches

by Hertz
Sat Apr 14, 2018 10:02 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

There's no support in Er9x, only ErSky9x AFAIK. Old-fashioned TH-9X with an Atmega64? If you did the telemetry mod for pin-5 of JR module bay, then there is a chance that it could work at least in theory (given firmware support), but I'm not sure if Atmega can cope with 400k baud bidir serial. CRSF ...
by Hertz
Mon Apr 09, 2018 10:34 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I really miss structs/records and the ability to pass them by value/reference :)
by Hertz
Mon Apr 09, 2018 8:26 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Is there an easier way to debug the scripts than constantly reflashing my radio? :-(
IMG_20180409_232452_HDR.jpg
by Hertz
Mon Apr 09, 2018 5:37 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Please allow bigger than 100 byte arrays as well.:)
by Hertz
Mon Apr 09, 2018 2:55 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Mike, I'm looking at what will be necessary for full implementation of crossfire script, and I noticed there are popup functions to ask user for confirmation: `popupConfirmation`, `popupWarning` Would it be possible to implement something like it to ask user for confirmation? I could implement in in...
by Hertz
Sun Apr 08, 2018 10:54 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Good, in case you didn't see this before, I attach this document. I'm not sure where I took the info about length value including itself, maybe while reading OpenTX code. Looks like it includes CRC instead, and first byte (sync or device address) plus second byte (frame length) constitute a 2-byte h...
by Hertz
Sun Apr 08, 2018 10:16 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Good to know, I suspected that after reading parser.cpp, but on the page 5 you listed another order of arguments, now it makes sense. So what is returned in payload now, data immediately following `length`, e.g. `&packet[2]` and so on? CRSF specification says `length` includes 1 byte for length itse...
by Hertz
Sun Apr 08, 2018 9:13 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Wow, I had both modules active and set to PPM, no idea why it happened. I now get continuous messages, but seems like crossfirereceive has command and count out arguments swapped. I'm finishing for today, it seems like I have enough working functions to finish a good part of the script now. Thank yo...
by Hertz
Sun Apr 08, 2018 7:44 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

jhsa I've noticed that indeed, thank you. Looks like it may be on the edge of usability with a fully-charged 3S battery then? I'll replace it ASAP once I get the AO3407A. With the latest binary I've found in ersky9x test versions thread I no longer get a return value different from 0 from `crossfire...
by Hertz
Sun Apr 08, 2018 7:05 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I understand, safety first. Would be nice to find another way of handling arrays of strings rather than having a huge `if idx = 0 then array0`. Maybe you could allow longer arrays then, and I'll flatten a two-dimensional array into one-dimensional? On a sidenote, am I putting something at risk by us...
by Hertz
Sun Apr 08, 2018 5:02 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I've made a typo when entering the message :) Seems like drawtext with a byte array argument doesn't accept 4th argument. Without 4th argument it works. I really miss some kind of indirection to not write code like this: if i = 0 drawtext(0, i * 8 + 9, device1Name) elseif i = 1 drawtext(0, i * 8 + 9...
by Hertz
Sun Apr 08, 2018 4:37 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I'm getting a syntax error for these lines, seemingly drawtext doesn't accept a byte array: array byte device1Name[32] rem -- later on drawtext(0, i * 8 + 9, device1Name[0], INVERS) I've also tried without subscript `[0]` with the same result. when drawtext is passed a byte array, it doesn't accept ...
by Hertz
Sun Apr 08, 2018 3:23 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

FIFO space is always `0x7f` on mine, while TelRxCount runs up quickly. All other lines are 0, just what I observe from inside the script. The issue was with `#ifdef REVX` I now receive the device info messages, but have another weird issue. My receive buffer is 64-bytes, and when third message arriv...
by Hertz
Sun Apr 08, 2018 1:38 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Here's the response to poll devices, it seemingly gets dropped because it doesn't fit into 16 byte limit. Overall great job Mike, implementing a protocol without hardware at hand is a great feat. Screen Shot 2018-04-08 at 16.37.22.png This one is 32-byte but may be as long as 64. This line in `cross...
by Hertz
Sun Apr 08, 2018 1:22 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I see the correct packages now, sorry Mike :) Will try to investigate why responses aren't arriving.
by Hertz
Sun Apr 08, 2018 11:47 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Thank you for your kind offer, unfortunately I'm not that close, Russia. For now AO3401 seems to work, I'll put 3407A on order.
Really stupid of me confusing middle pin for ground :(
by Hertz
Sun Apr 08, 2018 11:14 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I had no module connected at all, only probes at bottom pin (telemetry) and middle pin (ground). Will try to find a replacement unless it burnt something badly Is AO3401 a suitable replacement? Looks like drain pas got burnt, will have to jumper it. Lol, middle is power, not ground, that's the cause...
by Hertz
Sun Apr 08, 2018 10:52 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Seems like my quest is finished for now. Any idea what happened here? Too high current draw?
IMG_20180408_135108_HDR.jpg
by Hertz
Sun Apr 08, 2018 8:27 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Not sure what's wrong, but scoping into the SmartPort line with a Saleae logic analyser all I get is this. Screen Shot 2018-04-08 at 11.22.53.png No signs of Tx Module ID (0xEE), Radio Tx ID (0xEA) nor Poll Devices command (0x28) over a span of 5 seconds in decoded serial output. I had to disconnect...
by Hertz
Sat Apr 07, 2018 10:52 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Thanks Mike, I'll scope into the communication line tomorrow to see what happens. Still getting no responses for my `poll` command to CROSSFIRE TX :-(
by Hertz
Sat Apr 07, 2018 9:13 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Unfortunately I still get no messages from the Radio TX nor from the bound Receiver in telemetry script. Could you share the C-implementation of these two new functions to review? There is some fuss about extended headers for CRSF, maybe the cause is in how you're formatting header. Are you using "b...
by Hertz
Sat Apr 07, 2018 3:08 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Am I right to assume there are no scopes and hence no local variables? Passing parameters to a subroutine should be done via globals? Is there a possibility to as built-in construct to pass control to another script? E.g. in CROSSFIRE.bas I want to `return "CRSF_DEVICE.bas"` to pass execution along ...
by Hertz
Sat Apr 07, 2018 12:57 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Thank you, I'll try it. From your earlier message I've misunderstood it as If it's only necessary for send.
by Hertz
Sat Apr 07, 2018 12:02 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Here's the script I'm currently using and I get a blinking "send succeeded" line, while all other lines say "result is zero", "count is zero", "command is zero". It looks like the response of my CROSSFIRE Micro TX module never gets back. Is there a possibility ErSky9x hijacks it? https://github.com/...
by Hertz
Sat Apr 07, 2018 9:39 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Got it, thanks. What's up with int arrays? I get a syntax error for this line:
`array int deviceTimeouts[16]`
by Hertz
Sat Apr 07, 2018 9:06 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Thanks mike, would you recommend some way of storing and drawing a string received from `crossfireReceive` function? So far I can only think of having a predefined set of `array byte crossfireDeviceNameN[32]`, for `N = 0..16` to store received names. But how do I convert them back to `string` for dr...
by Hertz
Fri Apr 06, 2018 6:51 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I'm using 9xtreme :(
by Hertz
Thu Apr 05, 2018 5:22 pm
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

I can test it for you on real hardware scoping with a logic analyzer :-)
by Hertz
Thu Apr 05, 2018 11:01 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Any updates on the send function?
by Hertz
Sat Mar 24, 2018 10:15 am
Forum: ersky9xr
Topic: CRSF protocol for TBS Crossfire?
Replies: 189
Views: 35669

Re: CRSF protocol for TBS Crossfire?

Awesome Mike, I'm starting work on Crossfire script then, thank you

Go to advanced search