fix: typos
This commit is contained in:
		
							parent
							
								
									d7c274ca86
								
							
						
					
					
						commit
						d4ba7177d1
					
				
					 3 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,7 @@ mqtt-port = 1885
 | 
			
		|||
mqtt-host = localhost
 | 
			
		||||
 | 
			
		||||
relay-count = 10
 | 
			
		||||
relay-init = 1
 | 
			
		||||
relays-init = 1
 | 
			
		||||
 | 
			
		||||
database = controller_db.lmdb
 | 
			
		||||
log-level = debug
 | 
			
		||||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ init = 0
 | 
			
		|||
driver = piface
 | 
			
		||||
pin = 1
 | 
			
		||||
inverted = 0
 | 
			
		||||
init = 0
 | 
			
		||||
init = 1
 | 
			
		||||
 | 
			
		||||
[relay-2]
 | 
			
		||||
driver = gpio
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,9 +128,9 @@ config_load(IniDispatch *disp, void *config_void)
 | 
			
		|||
            strcpy(config->mqtt_host, disp->value);
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        if(CONFINI_IS_KEY("controller", "relay-init"))
 | 
			
		||||
        if(CONFINI_IS_KEY("controller", "relays-init"))
 | 
			
		||||
        {
 | 
			
		||||
            strcpy(config->relay_init, disp->value);
 | 
			
		||||
            config->relays_init = atoi(disp->value);
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        if(CONFINI_IS_KEY("controller", "relay-count"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,7 @@ main(int argc, const char** argv)
 | 
			
		|||
    global_config.mqtt_port = 1885;
 | 
			
		||||
 | 
			
		||||
    global_config.relay_count = 0;
 | 
			
		||||
    global_config.relay_init = -1;
 | 
			
		||||
    global_config.relays_init = -1;
 | 
			
		||||
 | 
			
		||||
    global_config.log_level = LOG_INFO;
 | 
			
		||||
    global_config.log_file = stdout;
 | 
			
		||||
| 
						 | 
				
			
			@ -141,14 +141,14 @@ main(int argc, const char** argv)
 | 
			
		|||
 | 
			
		||||
    for(uint_fast8_t i = 0; i < global_controller->relay_count; ++i)
 | 
			
		||||
    {
 | 
			
		||||
        int relay_default = global_config.relay_configs[i].init
 | 
			
		||||
        int relay_default = global_config.relay_configs[i].init;
 | 
			
		||||
        if(relay_default == -1)
 | 
			
		||||
        {
 | 
			
		||||
            relay_default = global_config.relays_init;
 | 
			
		||||
        }
 | 
			
		||||
        if(relay_default == -1)
 | 
			
		||||
        {
 | 
			
		||||
            relay_default = global_config.relay_configs[i].inverted
 | 
			
		||||
            relay_default = global_config.relay_configs[i].inverted;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue