fix: see last commit (I need tests)
This commit is contained in:
		
							parent
							
								
									d82a6219f0
								
							
						
					
					
						commit
						25eab5d38e
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
cmake_minimum_required (VERSION 3.7)
 | 
			
		||||
project(controller
 | 
			
		||||
        VERSION 0.3.6
 | 
			
		||||
        VERSION 0.3.7
 | 
			
		||||
        LANGUAGES C)
 | 
			
		||||
 | 
			
		||||
add_executable(controller src/main.c)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,17 +38,17 @@ handler_loop(struct mg_connection *c_mqtt)
 | 
			
		|||
 | 
			
		||||
        if(is_on_schedule)
 | 
			
		||||
        {
 | 
			
		||||
            if(!pulse_relay)
 | 
			
		||||
            {
 | 
			
		||||
                is_on = 1;
 | 
			
		||||
                LOGGER_DEBUG("relay %d is active\n", i);
 | 
			
		||||
            }
 | 
			
		||||
            if(pulse_relay && relay->pulse_timer)
 | 
			
		||||
            {
 | 
			
		||||
                is_on = 1;
 | 
			
		||||
                --relay->pulse_timer;
 | 
			
		||||
                LOGGER_DEBUG("relay %d is pulsing for %d more seconds\n", i, relay->pulse_timer);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                is_on = 1;
 | 
			
		||||
                LOGGER_DEBUG("relay %d is active\n", i);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue