Skip to content

Commit

Permalink
Merge pull request #407 from PartialVolume/Fix_temperature_update_in_…
Browse files Browse the repository at this point in the history
…drive_selection_window

Fix temperature update in drive selection window
  • Loading branch information
PartialVolume authored Feb 25, 2022
2 parents 7f16dd3 + 1384d8a commit 58576f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{

Expand Down Expand Up @@ -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] );

Expand Down Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]";
Expand All @@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley <[email protected]>\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";

0 comments on commit 58576f8

Please sign in to comment.