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

Data display formatting with 16 x 2 LCD #109

Open
f6fvy opened this issue Jun 10, 2024 · 1 comment
Open

Data display formatting with 16 x 2 LCD #109

f6fvy opened this issue Jun 10, 2024 · 1 comment

Comments

@f6fvy
Copy link
Contributor

f6fvy commented Jun 10, 2024

I'm having data formatting problems with a 16x2 LCD.
Depending on the values of Az and El, the string positions move, and the "°" symbol is displayed or not.

image

I want the Az and El labels to always be placed in the same place and the values to be formatted on the right with a ° symbol in all cases. This will always fit in a 16-column row.

I use the following options :

In rotator_features.h

#define OPTION_DISPLAY_STATUS
#define OPTION_DISPLAY_HEADING
#define OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE

In rotator_settings.h

#define LCD_COLUMNS 16 // 20 //16
#define LCD_ROWS 2 // 4 //2 // this is automatically set below for HARDWARE_EA4TX_ARS_USB and HARDWARE_M0UPU

#define LCD_HEADING_ROW 2
#define LCD_HEADING_FIELD_SIZE 16 // 20
#define LCD_STATUS_FIELD_SIZE 16 // 20

I think the problem(s) are around lines 5800-6100 of k3ng_rotator_controller.ino but it's too complicated for me ;-)

Using v2023.10.06.2200

@f6fvy
Copy link
Contributor Author

f6fvy commented Jun 13, 2024

I finally got it working by modifying few lines.

Lines 6022 and 6025 : The second argument of dtostrf set to 1 instead of 3.
Lines (6052, 6054), (6077, 6079) and (6135, 6137) : Removal of the test "if ((LCD_COLUMNS > 18)..."

Please note that these mods apply to my hardware setup (LCD 16 x 2) and may fail with other configurations. YMMV.

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

1 participant