moved wrong pclose

pull/98/head
alanbjohnston 5 years ago committed by GitHub
parent 8efc44ff31
commit 78e19fdcb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -271,8 +271,7 @@ int main(int argc, char * argv[]) {
// Check for SPI and AX-5043 Digital Transceiver Board
FILE * file = popen("sudo raspi-config nonint get_spi", "r");
pclose(file);
printf("getc: %c \n", fgetc(file));
// printf("getc: %c \n", fgetc(file));
if (fgetc(file) == 48) {
printf("SPI is enabled!\n");
@ -282,7 +281,7 @@ int main(int argc, char * argv[]) {
if (fgetc(file2) != 'l') {
printf("SPI devices present!\n");
// }
pclose(file2);
setSpiChannel(SPI_CHANNEL);
setSpiSpeed(SPI_SPEED);
initializeSpi();
@ -299,7 +298,9 @@ int main(int argc, char * argv[]) {
transmit = TRUE;
} else
printf("AX5043 not present!\n");
pclose(file2);
}
pclose(file);
}
// else
// {

Loading…
Cancel
Save

Powered by TurnKey Linux.