kopia lustrzana https://github.com/PiInTheSky/lora-gateway
V1.8.24: Better colours and added autostart.pdf
rodzic
29fc3bd104
commit
e96bd48d6a
|
@ -229,6 +229,13 @@ Many thanks to David Brooke for coding this feature and the AFC.
|
|||
Change History
|
||||
==============
|
||||
|
||||
27/02/2019 - V1.8.24
|
||||
--------------------
|
||||
|
||||
Better colours
|
||||
autostart.pdf added to show how to autostart the software and use screen to easily attach to it.
|
||||
Thanks to Steve Hyde for these.
|
||||
|
||||
27/02/2019 - V1.8.23
|
||||
--------------------
|
||||
|
||||
|
|
Plik binarny nie jest wyświetlany.
26
gateway.c
26
gateway.c
|
@ -41,7 +41,7 @@
|
|||
#include "udpclient.h"
|
||||
#include "lifo_buffer.h"
|
||||
|
||||
#define VERSION "V1.8.23"
|
||||
#define VERSION "V1.8.24"
|
||||
bool run = TRUE;
|
||||
|
||||
// RFM98
|
||||
|
@ -2129,39 +2129,33 @@ WINDOW *InitDisplay(void)
|
|||
|
||||
start_color( ); /* Initialize colours */
|
||||
|
||||
init_pair( 1, COLOR_WHITE, COLOR_BLUE );
|
||||
init_pair( 2, COLOR_YELLOW, COLOR_BLUE );
|
||||
init_pair( 3, COLOR_YELLOW, COLOR_BLACK );
|
||||
init_pair(1, COLOR_WHITE, COLOR_BLUE );
|
||||
init_pair(2, COLOR_WHITE, COLOR_BLACK );
|
||||
|
||||
color_set( 1, NULL );
|
||||
// bkgd(COLOR_PAIR(1));
|
||||
// attrset(COLOR_PAIR(1) | A_BOLD);
|
||||
color_set(1, NULL );
|
||||
|
||||
char buffer[80];
|
||||
|
||||
sprintf( buffer, "LoRa Habitat and SSDV Gateway by M0RPI, M0DNY, M0RJX - " VERSION);
|
||||
|
||||
// Title bar
|
||||
mvaddstr( 0, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
mvaddstr(0, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
|
||||
// Help
|
||||
sprintf( buffer, "Press (H) for Help");
|
||||
color_set( 3, NULL );
|
||||
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
color_set(2, NULL );
|
||||
mvaddstr(15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
|
||||
color_set( 1, NULL );
|
||||
refresh( );
|
||||
color_set(1, NULL );
|
||||
refresh();
|
||||
|
||||
// Windows for LoRa live data
|
||||
for ( Channel = 0; Channel <= 1; Channel++ )
|
||||
{
|
||||
Config.LoRaDevices[Channel].Window =
|
||||
newwin( 14, 38, 1, Channel ? 41 : 1 );
|
||||
wbkgd( Config.LoRaDevices[Channel].Window, COLOR_PAIR( 2 ) );
|
||||
wbkgd( Config.LoRaDevices[Channel].Window, COLOR_PAIR(1));
|
||||
|
||||
// wcolor_set(Config.LoRaDevices[Channel].Window, 2, NULL);
|
||||
// waddstr(Config.LoRaDevices[Channel].Window, "WINDOW");
|
||||
// mvwaddstr(Config.LoRaDevices[Channel].Window, 0, 0, "Window");
|
||||
wrefresh( Config.LoRaDevices[Channel].Window );
|
||||
}
|
||||
|
||||
|
|
10
gui.c
10
gui.c
|
@ -13,8 +13,8 @@ WINDOW *create_help_win(int height, int width, int starty, int startx)
|
|||
box(local_win, 0 , 0); /* 0, 0 gives default characters
|
||||
* for the vertical and horizontal
|
||||
* lines */
|
||||
wbkgd( local_win, COLOR_PAIR( 2 ) );
|
||||
color_set( 2, NULL );
|
||||
wbkgd( local_win, COLOR_PAIR(1));
|
||||
color_set(1, NULL );
|
||||
|
||||
|
||||
|
||||
|
@ -55,13 +55,13 @@ void destroy_help_win(WINDOW *local_win)
|
|||
// Remove the border
|
||||
wborder(local_win, ' ', ' ', ' ',' ',' ',' ',' ',' ');
|
||||
|
||||
color_set( 3, NULL );
|
||||
color_set(2, NULL );
|
||||
for (i=1;i<15;i++)
|
||||
mvaddstr(i, 39, " ");
|
||||
|
||||
// Put the HELP message back
|
||||
sprintf( buffer, " Press (H) for Help ");
|
||||
color_set( 3, NULL );
|
||||
color_set(2, NULL );
|
||||
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
|
||||
wrefresh(local_win);
|
||||
|
@ -82,7 +82,7 @@ void gui_show_help ()
|
|||
startx = 2; /* of the window */
|
||||
help_win = create_help_win(height, width, starty, startx);
|
||||
sprintf( buffer, "Press any key to return to the main screen!");
|
||||
color_set( 3, NULL );
|
||||
color_set(2, NULL );
|
||||
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||
|
||||
// Wait for any key to be pressed
|
||||
|
|
Ładowanie…
Reference in New Issue