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
|
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
|
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 "udpclient.h"
|
||||||
#include "lifo_buffer.h"
|
#include "lifo_buffer.h"
|
||||||
|
|
||||||
#define VERSION "V1.8.23"
|
#define VERSION "V1.8.24"
|
||||||
bool run = TRUE;
|
bool run = TRUE;
|
||||||
|
|
||||||
// RFM98
|
// RFM98
|
||||||
|
@ -2129,39 +2129,33 @@ WINDOW *InitDisplay(void)
|
||||||
|
|
||||||
start_color( ); /* Initialize colours */
|
start_color( ); /* Initialize colours */
|
||||||
|
|
||||||
init_pair( 1, COLOR_WHITE, COLOR_BLUE );
|
init_pair(1, COLOR_WHITE, COLOR_BLUE );
|
||||||
init_pair( 2, COLOR_YELLOW, COLOR_BLUE );
|
init_pair(2, COLOR_WHITE, COLOR_BLACK );
|
||||||
init_pair( 3, COLOR_YELLOW, COLOR_BLACK );
|
|
||||||
|
|
||||||
color_set( 1, NULL );
|
color_set(1, NULL );
|
||||||
// bkgd(COLOR_PAIR(1));
|
|
||||||
// attrset(COLOR_PAIR(1) | A_BOLD);
|
|
||||||
|
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
|
|
||||||
sprintf( buffer, "LoRa Habitat and SSDV Gateway by M0RPI, M0DNY, M0RJX - " VERSION);
|
sprintf( buffer, "LoRa Habitat and SSDV Gateway by M0RPI, M0DNY, M0RJX - " VERSION);
|
||||||
|
|
||||||
// Title bar
|
// Title bar
|
||||||
mvaddstr( 0, ( 80 - strlen( buffer ) ) / 2, buffer );
|
mvaddstr(0, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||||
|
|
||||||
// Help
|
// Help
|
||||||
sprintf( buffer, "Press (H) for Help");
|
sprintf( buffer, "Press (H) for Help");
|
||||||
color_set( 3, NULL );
|
color_set(2, NULL );
|
||||||
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
mvaddstr(15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||||
|
|
||||||
color_set( 1, NULL );
|
color_set(1, NULL );
|
||||||
refresh( );
|
refresh();
|
||||||
|
|
||||||
// Windows for LoRa live data
|
// Windows for LoRa live data
|
||||||
for ( Channel = 0; Channel <= 1; Channel++ )
|
for ( Channel = 0; Channel <= 1; Channel++ )
|
||||||
{
|
{
|
||||||
Config.LoRaDevices[Channel].Window =
|
Config.LoRaDevices[Channel].Window =
|
||||||
newwin( 14, 38, 1, Channel ? 41 : 1 );
|
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 );
|
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
|
box(local_win, 0 , 0); /* 0, 0 gives default characters
|
||||||
* for the vertical and horizontal
|
* for the vertical and horizontal
|
||||||
* lines */
|
* lines */
|
||||||
wbkgd( local_win, COLOR_PAIR( 2 ) );
|
wbkgd( local_win, COLOR_PAIR(1));
|
||||||
color_set( 2, NULL );
|
color_set(1, NULL );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ void destroy_help_win(WINDOW *local_win)
|
||||||
// Remove the border
|
// Remove the border
|
||||||
wborder(local_win, ' ', ' ', ' ',' ',' ',' ',' ',' ');
|
wborder(local_win, ' ', ' ', ' ',' ',' ',' ',' ',' ');
|
||||||
|
|
||||||
color_set( 3, NULL );
|
color_set(2, NULL );
|
||||||
for (i=1;i<15;i++)
|
for (i=1;i<15;i++)
|
||||||
mvaddstr(i, 39, " ");
|
mvaddstr(i, 39, " ");
|
||||||
|
|
||||||
// Put the HELP message back
|
// Put the HELP message back
|
||||||
sprintf( buffer, " Press (H) for Help ");
|
sprintf( buffer, " Press (H) for Help ");
|
||||||
color_set( 3, NULL );
|
color_set(2, NULL );
|
||||||
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||||
|
|
||||||
wrefresh(local_win);
|
wrefresh(local_win);
|
||||||
|
@ -82,7 +82,7 @@ void gui_show_help ()
|
||||||
startx = 2; /* of the window */
|
startx = 2; /* of the window */
|
||||||
help_win = create_help_win(height, width, starty, startx);
|
help_win = create_help_win(height, width, starty, startx);
|
||||||
sprintf( buffer, "Press any key to return to the main screen!");
|
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 );
|
mvaddstr( 15, ( 80 - strlen( buffer ) ) / 2, buffer );
|
||||||
|
|
||||||
// Wait for any key to be pressed
|
// Wait for any key to be pressed
|
||||||
|
|
Ładowanie…
Reference in New Issue