Mon, 15 Apr 2024 17:04:57 +0200
Better websocket broadcast messages. Added GLOBAL JSON command to the server. Better logic to trigger websocket and mqtt data updates for the fermenter units. Websocket receive added fermenter mode, stage, setpoints, switches. Added more css styles for the fermenter screen. Added the fermenter screen php and javascript.
41
f534ace74eea
Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents:
39
diff
changeset
|
1 | # Makefile for the mbsePi-apps/thermferm. |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | include ../Makefile.global |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | |
39
442357970a34
More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents:
27
diff
changeset
|
5 | SRCS = $(wildcard *.c) |
442357970a34
More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents:
27
diff
changeset
|
6 | HDRS = $(wildcard *.h) |
442357970a34
More Makefiles made simpeler. Version 0.0.6
Michiel Broek <mbroek@mbse.eu>
parents:
27
diff
changeset
|
7 | OBJS = $(SRCS:.c=.o) |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
47
diff
changeset
|
8 | SLIBS = -lpthread |
41
f534ace74eea
Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents:
39
diff
changeset
|
9 | TARGET = thermferm |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | OTHER = Makefile |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | ############################################################################# |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | .c.o: |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | all: ${TARGET} |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | |
41
f534ace74eea
Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents:
39
diff
changeset
|
19 | thermferm: ${OBJS} ${SLIBS} |
f534ace74eea
Code preparation for client/server communication
Michiel Broek <mbroek@mbse.eu>
parents:
39
diff
changeset
|
20 | ${CC} -o thermferm ${OBJS} ${LDFLAGS} ${LIBS} ${SLIBS} |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | clean: |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | install: all |
635
bf2c0f31147b
Create installation directories
Michiel Broek <mbroek@mbse.eu>
parents:
633
diff
changeset
|
26 | @mkdir -p ${DESTDIR}${BINDIR} |
633
8b84e73af50e
Add DESTDIR installation target. Some kicad update again. Moved init script to /etc/rc.d
Michiel Broek <mbroek@mbse.eu>
parents:
591
diff
changeset
|
27 | ${INSTALL} -c -s -g root -o root -m 0755 thermferm ${DESTDIR}${BINDIR} |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | filelist: Makefile |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | BASE=`pwd`; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | BASE=`basename $${BASE}`; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | (for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | depend: |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | @rm -f Makefile.bak; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | mv Makefile Makefile.bak; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | >>Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | ${ECHO} '# Dependencies generated by make depend' >>Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | for f in ${SRCS}; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | do \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | ${ECHO} "Dependencies for $$f:\c"; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | for h in `sed -n -e \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | do \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | ${ECHO} " $$h\c"; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | ${ECHO} " $$h\c" >>Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
50 | done; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | ${ECHO} " done."; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | ${ECHO} "" >>Makefile; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | done; \ |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | ${ECHO} '# End of generated dependencies' >>Makefile |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | # Dependencies generated by make depend |
675
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
58 | delay.o: delay.h thermferm.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
59 | devices.o: thermferm.h delay.h devices.h rc-switch.h panel.h xutil.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
60 | futil.o: thermferm.h futil.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
61 | lcd-buffer.o: thermferm.h lcd-buffer.h lcd-pcf8574.h slcd.h panel.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
62 | lcd-pcf8574.o: thermferm.h lcd-pcf8574.h slcd.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
63 | lock.o: lock.h thermferm.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
64 | mqtt.o: thermferm.h rdconfig.h devices.h xutil.h delay.h mqtt.h websocket.h |
660
a28ef4d9afa4
Version 0.9.17a1. Revised starting and stopping the threads. Fixed stopping the command server thread. Moved one-wire tempeature sensors resolution correction to the one-wire thread. The devices thread fetches temperatures from the one-wire thread. The one-wire thread does everything for the temperature sensors. The command server uses private sockets. Still, only one session at the same time is handled.
Michiel Broek <mbroek@mbse.eu>
parents:
654
diff
changeset
|
65 | one-wire.o: thermferm.h statetbl.h one-wire.h devices.h delay.h futil.h xutil.h |
652
16d3d4b58b5b
Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents:
635
diff
changeset
|
66 | panel.o: thermferm.h delay.h lcd-pcf8574.h slcd.h panel.h |
316
73cd31dc6ce1
Moved pid function to separate files
Michiel Broek <mbroek@mbse.eu>
parents:
259
diff
changeset
|
67 | pid.o: thermferm.h pid.h |
652
16d3d4b58b5b
Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents:
635
diff
changeset
|
68 | rc-switch.o: thermferm.h xutil.h delay.h rc-switch.h |
675
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
69 | rdconfig.o: rdconfig.h thermferm.h pid.h futil.h xutil.h |
652
16d3d4b58b5b
Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents:
635
diff
changeset
|
70 | server.o: rdconfig.h thermferm.h delay.h devices.h server.h lcd-buffer.h xutil.h mqtt.h |
16d3d4b58b5b
Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents:
635
diff
changeset
|
71 | simulator.o: thermferm.h delay.h simulator.h |
16d3d4b58b5b
Moved all delay functions into a new general file.
Michiel Broek <mbroek@mbse.eu>
parents:
635
diff
changeset
|
72 | slcd.o: thermferm.h slcd.h futil.h xutil.h |
675
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
73 | thermferm.o: lock.h rdconfig.h server.h thermferm.h devices.h delay.h simulator.h lcd-pcf8574.h lcd-buffer.h slcd.h panel.h one-wire.h futil.h xutil.h pid.h mqtt.h statetbl.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
74 | websocket.o: thermferm.h xutil.h websocket.h |
825210ba2707
Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped.
Michiel Broek <mbroek@mbse.eu>
parents:
660
diff
changeset
|
75 | xutil.o: thermferm.h xutil.h |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | # End of generated dependencies |