diff --git a/firmware/basic/config.c b/firmware/basic/config.c index 0e3b35f..396e500 100644 --- a/firmware/basic/config.c +++ b/firmware/basic/config.c @@ -1,6 +1,7 @@ #include #include "basic/basic.h" +#include "lcd/display.h" #include "lcd/print.h" #include "filesystem/ff.h" #include "basic/random.h" @@ -32,7 +33,7 @@ char nickfont[FILENAMELEN]; void applyConfig(){ if(GLOBAL(lcdcontrast)>0) lcdSetContrast(GLOBAL(lcdcontrast)); - return 0; + return; }; int saveConfig(void){ diff --git a/firmware/basic/night.c b/firmware/basic/night.c index 9423ffd..5efe7c4 100644 --- a/firmware/basic/night.c +++ b/firmware/basic/night.c @@ -14,8 +14,6 @@ void LightCheck(void){ int iocon; char iodir; - int value; - iocon=IOCON_PIO1_11; // iodir=gpioGetDir(RB_LED3); iodir= (GPIO_GPIO1DIR & (1 << (RB_LED3) ))?1:0; @@ -28,10 +26,6 @@ void LightCheck(void){ gpioSetDir(RB_LED3, iodir); IOCON_PIO1_11=iocon; - if(threshold==0){ // uninitialized? - threshold=320; - }; - if(_isnight && light/SAMPCT>(threshold+RANGE)) _isnight=0; diff --git a/firmware/basic/random.c b/firmware/basic/random.c index 06500ca..08b5a05 100644 --- a/firmware/basic/random.c +++ b/firmware/basic/random.c @@ -1,6 +1,7 @@ #include #include "random.h" #include "xxtea.h" +#include "core/adc/adc.h" #define STATE_SIZE 8 uint32_t state[STATE_SIZE]; diff --git a/firmware/funk/filetransfer.c b/firmware/funk/filetransfer.c index ffa4b94..375d4cd 100644 --- a/firmware/funk/filetransfer.c +++ b/firmware/funk/filetransfer.c @@ -108,7 +108,7 @@ int filetransfer_receive(uint8_t *mac, uint32_t const k[4]) } lcdRefresh(); if( fres < 0 ) - return; + return 1; //nrf_set_rx_mac(0, 32, 5, macbuf); xxtea_decode_words((uint32_t *)buf, wordcount, k); diff --git a/firmware/funk/rftransfer.c b/firmware/funk/rftransfer.c index b392152..cda2e50 100644 --- a/firmware/funk/rftransfer.c +++ b/firmware/funk/rftransfer.c @@ -1,6 +1,7 @@ #include "rftransfer.h" #include "nrf24l01p.h" #include +#include #include #include diff --git a/firmware/main.c b/firmware/main.c index bcef02d..e24f7db 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -5,6 +5,7 @@ #include "basic/basic.h" #include "lcd/render.h" +#include "filesystem/ff.h" /**************************************************************************/