define-switch for frozen alert
This commit is contained in:
		
							
								
								
									
										24
									
								
								astyle.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								astyle.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | |||||||
|  | #! /bin/bash | ||||||
|  |  | ||||||
|  | echo starting astyle for $PWD | ||||||
|  |  | ||||||
|  | astyle --style=gnu src/*.cpp | ||||||
|  | rm -f src/*.orig | ||||||
|  |  | ||||||
|  | astyle --style=gnu src/shred/*.cpp | ||||||
|  | rm -f src/shred/*.orig | ||||||
|  |  | ||||||
|  | astyle --style=gnu src/logger/*.cpp | ||||||
|  | rm -f src/logger/*.orig | ||||||
|  |  | ||||||
|  |  | ||||||
|  | astyle --style=gnu include/*.h | ||||||
|  | rm -f include//*.orig | ||||||
|  |  | ||||||
|  | astyle --style=gnu include//shred/*.h | ||||||
|  | rm -f include//shred/*.orig | ||||||
|  |  | ||||||
|  | astyle --style=gnu include//logger/*.h | ||||||
|  | rm -f include//logger/*.orig | ||||||
|  |  | ||||||
|  | echo finished astyle for $PWD | ||||||
							
								
								
									
										6
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								makefile
									
									
									
									
									
								
							| @ -167,6 +167,7 @@ clean: | |||||||
| 	@echo "Deleting directories" | 	@echo "Deleting directories" | ||||||
| 	@$(RM) -r build | 	@$(RM) -r build | ||||||
| 	@$(RM) -r bin | 	@$(RM) -r bin | ||||||
|  | 	@$(RM) -f reHDD.log | ||||||
|  |  | ||||||
| # Main rule, checks the executable and symlinks to the output | # Main rule, checks the executable and symlinks to the output | ||||||
| all: $(BIN_PATH)/$(BIN_NAME) | all: $(BIN_PATH)/$(BIN_NAME) | ||||||
| @ -199,6 +200,7 @@ $(BUILD_PATH)/%.o: $(SRC_PATH)/%.$(SRC_EXT) | |||||||
| docs: | docs: | ||||||
| 	@$(RM) -r $(DOCDIR)/html | 	@$(RM) -r $(DOCDIR)/html | ||||||
| 	@doxygen $(DOCDIR)/doxyfile | 	@doxygen $(DOCDIR)/doxyfile | ||||||
|  |  | ||||||
| 	 |  | ||||||
| 	 | 	 | ||||||
|  | .PHONY: style	 | ||||||
|  | style: | ||||||
|  | 	@bash astyle.sh | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								src/tui.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/tui.cpp
									
									
									
									
									
								
							| @ -112,11 +112,15 @@ void TUI::updateTUI(vector <Drive>* pvecDrives, uint8_t u8SelectedEntry) | |||||||
|                         } |                         } | ||||||
|                     break; |                     break; | ||||||
|                 case Drive::FROZEN: |                 case Drive::FROZEN: | ||||||
| #ifdef FROZEN_ALERT |  | ||||||
|                     stream << fixed << setprecision(2) << (it->getTaskPercentage()); |                     stream << fixed << setprecision(2) << (it->getTaskPercentage()); | ||||||
|                     dialog=createFrozenWarning(70, 16, ((stdscrX)-(int)(stdscrX/2)-35),(int)(stdscrY/2)-8, it->getPath(), it->getModelFamily(), it->getModelName(), it->getSerial(), stream.str() + "%"); | #ifdef FROZEN_ALERT | ||||||
|                     wrefresh(dialog); |                     if(bSelectedEntry) | ||||||
|  |                         { | ||||||
|  |                             dialog=createFrozenWarning(70, 16, ((stdscrX)-(int)(stdscrX/2)-20),(int)(stdscrY/2)-8, it->getPath(), it->getModelFamily(), it->getModelName(), it->getSerial(), stream.str() + "%"); | ||||||
|  |                             wrefresh(dialog); | ||||||
|  |                         } | ||||||
| #endif | #endif | ||||||
|  |                     sState = "FROZEN " + stream.str() + "%"; //mark drive as frozen and reached progress | ||||||
|                     break; |                     break; | ||||||
|                 default: |                 default: | ||||||
|                     break; |                     break; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user