diff --git a/avrtft.c b/avrtft.c
index 916a506..01be437 100644
--- a/avrtft.c
+++ b/avrtft.c
@@ -33,8 +33,6 @@
#include "touch.h"
#include "paint.h"
-static bool once = false;
-static volatile uint16_t ints = 0;
static volatile bool touch = false;
ISR(INT0_vect) {
@@ -115,15 +113,11 @@
_delay_ms(1);
touch = false;
+ // do something at the start
+ initPaint();
+ // hackDemo();
+
while (true) {
-
- // show a demo once at the start
- if (!once) {
- initPaint();
- // hackDemo();
- once = true;
- }
-
if (touch) {
touch = false;
Point point = {0};
diff --git a/nbproject/Makefile-Custom.mk b/nbproject/Makefile-Custom.mk
index b615b61..7b44f90 100644
--- a/nbproject/Makefile-Custom.mk
+++ b/nbproject/Makefile-Custom.mk
@@ -42,10 +42,10 @@
${OBJECTDIR}/_ext/48b9b4a1/font.o \
${OBJECTDIR}/_ext/48b9b4a1/hack.o \
${OBJECTDIR}/_ext/48b9b4a1/i2c.o \
+ ${OBJECTDIR}/_ext/48b9b4a1/paint.o \
${OBJECTDIR}/_ext/48b9b4a1/spi.o \
${OBJECTDIR}/_ext/48b9b4a1/tft.o \
- ${OBJECTDIR}/_ext/48b9b4a1/touch.o \
- ${OBJECTDIR}/paint.o
+ ${OBJECTDIR}/_ext/48b9b4a1/touch.o
# C Compiler Flags
@@ -100,6 +100,10 @@
${MKDIR} -p ${OBJECTDIR}/_ext/48b9b4a1
$(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -o ${OBJECTDIR}/_ext/48b9b4a1/i2c.o /home/dode/dev/avrtft/i2c.c
+${OBJECTDIR}/_ext/48b9b4a1/paint.o: /home/dode/dev/avrtft/paint.c
+ ${MKDIR} -p ${OBJECTDIR}/_ext/48b9b4a1
+ $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -o ${OBJECTDIR}/_ext/48b9b4a1/paint.o /home/dode/dev/avrtft/paint.c
+
${OBJECTDIR}/_ext/48b9b4a1/spi.o: /home/dode/dev/avrtft/spi.c
${MKDIR} -p ${OBJECTDIR}/_ext/48b9b4a1
$(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/48b9b4a1/spi.o /home/dode/dev/avrtft/spi.c
@@ -112,10 +116,6 @@
${MKDIR} -p ${OBJECTDIR}/_ext/48b9b4a1
$(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -o ${OBJECTDIR}/_ext/48b9b4a1/touch.o /home/dode/dev/avrtft/touch.c
-${OBJECTDIR}/paint.o: paint.c
- ${MKDIR} -p ${OBJECTDIR}
- $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -o ${OBJECTDIR}/paint.o paint.c
-
# Subprojects
.build-subprojects:
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 38f67d6..6247786 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -77,6 +77,10 @@
-
+ -
+
+ -
+
-
-
@@ -85,10 +89,6 @@
-
- -
-
- -
-
diff --git a/paint.c b/paint.c
index 7d73e8d..460d11d 100644
--- a/paint.c
+++ b/paint.c
@@ -79,7 +79,7 @@
// increment line thickness
thick += 3;
if (thick > 12) thick = 3;
- thoff = thick / 2 + 1;
+ thoff = (thick + 1) / 2;
} else if (i < TOOL_COUNT) {
// repaint tools, highlight and select tool
paintTools();