Make saveing and loading to epprop a user controlled operation
This commit is contained in:
		
							parent
							
								
									27509e21ee
								
							
						
					
					
						commit
						c0ca4c81d0
					
				
					 4 changed files with 51 additions and 16 deletions
				
			
		|  | @ -50,7 +50,18 @@ int8_t W433DataReciver::reciveBit(uint8_t index) | |||
| 
 | ||||
| void W433DataReciver::waitForReciveIdle(const uint16_t timeoutMs) | ||||
| { | ||||
|     for(uint16_t i = 0; i < timeoutMs && state != LOOKING_FOR_SYNC; ++i ) _delay_ms(1); | ||||
|     uint16_t counter = 0; | ||||
|     while(true) | ||||
|     { | ||||
|         while(counter < timeoutMs && state != LOOKING_FOR_SYNC) | ||||
|         { | ||||
|             _delay_ms(1); | ||||
|             ++counter; | ||||
|         } | ||||
|         _delay_ms(500); | ||||
|         counter+=500; | ||||
|         if(state == LOOKING_FOR_SYNC || counter >= timeoutMs) break; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue