lib/rdconfig.c

changeset 17
b802305046dc
parent 9
91218bc77abc
child 24
873786a20a61
equal deleted inserted replaced
16:f4cbe008da72 17:b802305046dc
46 */ 46 */
47 key_list keytab[] = { 47 key_list keytab[] = {
48 {(char *)"mosq_host", getstr, &Config.mosq_host}, 48 {(char *)"mosq_host", getstr, &Config.mosq_host},
49 {(char *)"mosq_port", getint, (char **)&Config.mosq_port}, 49 {(char *)"mosq_port", getint, (char **)&Config.mosq_port},
50 {(char *)"w1therm", getw1, (char **)&Config.w1therms}, 50 {(char *)"w1therm", getw1, (char **)&Config.w1therms},
51 #ifdef HAVE_WIRINGPI_H
52 {(char *)"lcd_cols", getint, (char **)&Config.lcd_cols},
53 {(char *)"lcd_rows", getint, (char **)&Config.lcd_rows},
54 #endif
51 {NULL, NULL, NULL} 55 {NULL, NULL, NULL}
52 }; 56 };
53 57
54 58
55 59
75 if (tmp1->alias) 79 if (tmp1->alias)
76 free(tmp1->alias); 80 free(tmp1->alias);
77 free(tmp1); 81 free(tmp1);
78 } 82 }
79 Config.w1therms = NULL; 83 Config.w1therms = NULL;
84
85 #ifdef HAVE_WIRINGPI_H
86 Config.lcd_cols = 16;
87 Config.lcd_rows = 2;
88 #endif
80 } 89 }
81 90
82 91
83 92
84 int rdconfig(void) 93 int rdconfig(void)

mercurial