Merge pull request #407 from PartialVolume/Fix_temperature_update_in_drive_selection_window

Fix temperature update in drive selection window
This commit is contained in:
PartialVolume
2022-02-25 22:47:06 +00:00
committed by GitHub
2 changed files with 14 additions and 2 deletions

View File

@@ -637,6 +637,8 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
stdscr_lines_previous = stdscr_lines;
stdscr_cols_previous = stdscr_cols;
time_t temperature_check_time = time( NULL );
do
{
@@ -798,6 +800,9 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
} /* switch select */
/* Read the drive temperature values */
nwipe_update_temperature( c[i + offset] );
/* print the temperature */
wprintw_temperature( c[i + offset] );
@@ -1231,6 +1236,13 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
* this change and exits the valid key hit loop so the windows can be updated */
getmaxyx( stdscr, stdscr_lines, stdscr_cols );
/* Update the selection window every 60 seconds specifically so that the drive temperatures are updated */
if( time( NULL ) > ( temperature_check_time + 60 ) )
{
temperature_check_time = time( NULL );
validkeyhit = 1;
}
} /* key hit loop */
while( validkeyhit == 0 && terminate_signal != 1 && stdscr_cols_previous == stdscr_cols
&& stdscr_lines_previous == stdscr_lines );

View File

@@ -4,7 +4,7 @@
* used by configure to dynamically assign those values
* to documentation files.
*/
const char* version_string = "0.32.024";
const char* version_string = "0.32.025";
const char* program_name = "nwipe";
const char* author_name = "Martijn van Brummelen";
const char* email_address = "git@brumit.nl";
@@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley <andy@andybev.com>\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE.\n";
const char* banner = "nwipe 0.32.024";
const char* banner = "nwipe 0.32.025";