Uniden Remote Head Project

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
4.3"
Subdued keypad in background that the text will overwrite when it's wide enough. Main buttons on the bottom edge. Touch areas over the SYSTEM,DEPARTMENT,CHANNEL names to hold just likea HomePatrol.
That's looking really good. The overlay works...a nice balance of having a keypad but it's not obtrusive or obstructing other info. I like the buttons at the bottom, which I'm going to try in my aforementioned remote head.

Is your baud rate to the scanner fixed? Just wondering if you decide to produce these...will you need any kind of options or setup page?
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
Here is a file to get you started if you are inclined to mess with it while I work on finishing the actual Nextion version.
I checked out your code & fully understand the design is dependent on strings lengths and character positions. But this snippet caught my eye as potentially risky:
Code:
if (totalChars == 1093) {
      Serial.println("detail and closecall display");
    }
    else;
    if (totalChars == 904) {
      Serial.println("simple display");
    }
    if (totalChars == 652) {
      Serial.println("menu display");
    }
Those are very specific numbers. What if these change in future firmware updates? Of course any change to the protocol might risk any part of the code. But if this particular section becomes a problem...you could use a range instead of equality, which would insulate your code from minor length changes, i.e.
menu display: totalChars > 600 && totalChars < 800
simple display: totalChars > 800 && totalChars < 1000
detail display: totalChars > 1000
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
Good catch. Yes that has since been changed. It now uses the display attributes or whatever it's called line that looks like binary to determine screen type with srncomp.

However, unless I'm mistaken, if something changes in the future it's going to be a problem regardless since the offsets will change.

The only easy way out of that I can see is strtok with comma delimiters. Then you run into the issue of a comma potentially being used in a name field which breaks it.
 

jonwienke

More Info Coming Soon!
Joined
Jul 18, 2014
Messages
13,409
Location
VA
Check for the total number of commas in the line. If there are more than normal, you know there extra commas in the display text, and how many. Then you can ignore the extra ones.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
Yea but then you have to pause the string tokenizer strtok function mid string somehow, grab the data - the extra location x number of pointers then start back up again. It can be done but...
I guess a guy could copy up to that point then cat the rest together. The point of strtok is it's fast easy and reliable. It comes down to either counting commas or 30 byte wide chunks. Within those 30 wide chunks are the varying (from 2 to 16 wide sub field portions). If you want control over those individually you have to extract them all, thus the multiple strcpy functions.
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
However, unless I'm mistaken, if something changes in the future it's going to be a problem regardless since the offsets will change.
Correct. This type of code is totally dependent on the protocol format, so there's always a risk that something could sink the code. But then you can also spend a lot of trying to insulate your code from protocol changes, which may or may not ever happen. My BC780 code never changed because there were no firmware updates. Maybe ProScan can chime in, if he's ever seen breaking protocol changes over the years. I went through some minor comma hell with parsing ads-b, but it's highly unlikely there will ever be breaking changes.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
That's looking really good. The overlay works...a nice balance of having a keypad but it's not obtrusive or obstructing other info. I like the buttons at the bottom, which I'm going to try in my aforementioned remote head.

Is your baud rate to the scanner fixed? Just wondering if you decide to produce these...will you need any kind of options or setup page?

Thanks. USB baud is at this #define USBBAUD 500000 and seems fine. There are no adjustments needed in the radio. The user will have to decide what to display though using the detail display custimization which can be an issue for some but there's no way around that unless you display every single field. I tried to whittle it down a bit to accomodate larger fonts for mobile use as requested by most. Earlier I posted a list of what fields are used starting from top to bottom.
 

bgav

Member
Premium Subscriber
Joined
Oct 10, 2009
Messages
375
Location
Central MA
Bill, you bet!

mancow is using a Teensy (I believe) microcontroller with an intelligent Nextion display. It's like an Arduino, if that helps. The Teensy is programmed with a variant of the C language. The Nextion display can be developed using a programming tool to make usable displays pretty quickly.

I am also developing a remote head, but not a scanner remote head. Its for my ads-b 'scanner' that I developed using a Raspberry Pi and the Python programming language and a TFT display (see pic, which by the way is showing a USN aircraft over Cleveland in early December). This display is not intelligent, so unlike the Nextion I had to program everything you see in Python code. My project uses a USB SDR and an antenna, which means it's parked in a fixed location. So I'm developing a remote head using another rPi and TFT display, and they communicate via wireless networking. I digress a bit, but these are the technologies mancow and I have been discussing.

Here's an actual remote head I built in 2013 for my BC780.

My custom ads-b scanner:
View attachment 78535
Interested in that as well. More info?
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
So, I wanted nice RSSI CloseCall bars...

In looking at it they don't provide any integer value for each 0 through 6 freq range. It's basically like a bitmap. I would have to start at the top of a bar, iterate 62 bytes write that value to an array and so forth 10 times for each of the 7 bars until the bottom of the last one all due to the X,Y horizontal vertical convergance pattern. Then I would be left with an array of 0x01 and 0x20 data which would have to be converted to 1,0 binary respectively then converted to decimal value before shipping it off to the vertical progress bar.

Man, they make this so simple that in the end they didn't make it easy at all. 5 beers and a headache later you get what you get. Bland bars and numbers unless someone has a better idea. As it is now it works but is a bit smaller due to the aspect ratio. I was hoping to dress it up a bit.
 
Top