Skip to content

Commit

Permalink
V2.00 Issue #52 Updatefähigkeit verbessert
Browse files Browse the repository at this point in the history
- Issue #52 parameter.h im .gitignore aktiviert und parameter.h.temp eingebunden
- Schriftgröße fest auf 8x16 umgestellt
- Bei der Anzeige für Strom wurde die erste 0 nach dem Komma nicht angezeigt
- In der Ansicht Aktor / DHT die Schrift für Größe 8x16 angepasst
- Nur Programme die laufen werden beim ./stop beendet
- Changelog archiviert
  • Loading branch information
nischram committed Jun 7, 2021
1 parent 6581cfb commit 4822336
Show file tree
Hide file tree
Showing 25 changed files with 634 additions and 461 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,5 @@

.metadata/
RemoteSystemsTempFiles/.project
parameter.h
parameterHM.h
27 changes: 27 additions & 0 deletions Changelog_Archiv/README.markdown
@@ -1,4 +1,31 @@
# Changelog Archiv
V1.92 30.05.2021 [Issue #60](https://github.com/nischram/E3dcGui/issues/60) Tracker 1 zeigt Strom und Spannung falsch
- [Issue #60](https://github.com/nischram/E3dcGui/issues/60) Fehler behoben

V1.92 28.05.2021 in Version V1.91 das Programm "Rscp/wbCheckHM" vergessen
- Programm angepasst und die Funktion senden von HM zu WB erweitert um Stop und Phasen

V1.91 28.05.2021 [Issue #58](https://github.com/nischram/E3dcGui/issues/58) Notstrom-Reserve des Speichers
- Für [Issue #58](https://github.com/nischram/E3dcGui/issues/58) kann nun die Reserve aktiviert oder eingestellt werden
- Für [Issue #59](https://github.com/nischram/E3dcGui/issues/59) Stop-Button im Setup-Menü
- Für [Issue #55](https://github.com/nischram/E3dcGui/issues/55) zur Wallbox kann jetzt die Anzahl der Phasen vorgewählt werden
- Für [Issue #56](https://github.com/nischram/E3dcGui/issues/56) kann jetzt eine Ladung gestoppt werden

V1.90 23.05.2021 [Issue #58](https://github.com/nischram/E3dcGui/issues/58) Schriftgröße der Leistungswerte
- Für Issue #58 Schriftgöße angepasset

V1.89 03.05.2021 Wallbox Daten an HM senden und auslesen
- Wallbox-Werte an die HM senden
- Wallbox-Parameter aus HM lesen und an WB senden

V1.88 03.04.2021 Anleitung überarbeitet

V1.87 29.03.2021 Wallbox anzeigen o. steuern / Fehlerbehebung
- Wallbox-Menü zur Anzeige und Steuerung
- Fehlerkorrektur im Setup-Menü
- kleine Fehlerkorrekturen
- Changelog archiviert

V1.86 13.02.2021 Fehlerkorrektur für neuere Rasbain Versionen [Issue #48](https://github.com/nischram/E3dcGui/issues/48)
- Issue #48
- Anpassungen an der README
Expand Down
66 changes: 33 additions & 33 deletions External/Aktor.h
Expand Up @@ -276,52 +276,52 @@ int drawAktorFrame(int AktorTyp, int AktorPowerOn, int AktorPowerOff,
char *designation, char *AktorName, int Line)
{
char OUT[56];
drawSquare(405,Line-20,363,60,GREY);
drawCorner(405,Line-20,363,60,WHITE);
drawSquare(405+120,Line-17,240,54,WHITE);
drawCorner(405+120,Line-17,240,54,GREY);
put_string(405+6, Line+4, designation, WHITE);
drawSquare(405,Line-20,363,68,GREY);
drawCorner(405,Line-20,363,68,WHITE);
drawSquare(405+120,Line-17,240,62,WHITE);
drawCorner(405+120,Line-17,240,62,GREY);
put_string(405+6, Line, designation, WHITE);
if (AktorTyp > 0){
createData(565-30, Line-36, AktorName);
put_string(565-30, Line-18, AktorName, GREY);
if (AktorTyp >= 11){
snprintf (OUT, (size_t)100, "On: %s", AktorTimerOn);
createData(565+90, Line-22, OUT);
put_string(565+90, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Off: %s", AktorTimerOff);
createData(565+90, Line-10, OUT);
put_string(565+90, Line+12, OUT, GREY);
}
if (AktorTyp == 1 || AktorTyp == 11){
put_string(405+6, Line-14, "\232berschuss", WHITE);
put_string(405+6, Line-16, "\232berschuss", WHITE);
snprintf (OUT, (size_t)100, "On: %i W", AktorPowerOn);
createData(565-30, Line-22, OUT);
put_string(565-30, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Off: Bezug");
createData(565-30, Line-10, OUT);
put_string(565-30, Line+12, OUT, GREY);
snprintf (OUT, (size_t)100, "Min On: %i Off: %i Minuten", AktorMinOn, AktorMinOff);
createData(565-30, Line+2, OUT);
put_string(565-30, Line+27, OUT, GREY);
}
else if (AktorTyp == 2 || AktorTyp == 12){
put_string(405+6, Line-14, "Solar", WHITE);
put_string(405+6, Line-16, "Solar", WHITE);
snprintf (OUT, (size_t)100, "On: %i W", AktorPowerOn);
createData(565-30, Line-22, OUT);
put_string(565-30, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Off: %i W", AktorPowerOff);
createData(565-30, Line-10, OUT);
put_string(565-30, Line+12, OUT, GREY);
snprintf (OUT, (size_t)100, "Min On: %i Off: %i Minuten", AktorMinOn, AktorMinOff);
createData(565-30, Line+2, OUT);
put_string(565-30, Line+27, OUT, GREY);
}
else if (AktorTyp == 3 || AktorTyp == 13){
put_string(405+6, Line-14, "Battery", WHITE);
put_string(405+6, Line-16, "Battery", WHITE);
snprintf (OUT, (size_t)100, "On: > %i %%", AktorPercentOn);
createData(565-30, Line-22, OUT);
put_string(565-30, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Off: < %i %%", AktorPercentOff);
createData(565-30, Line-10, OUT);
put_string(565-30, Line+12, OUT, GREY);
snprintf (OUT, (size_t)100, "Min On: %i Off: %i Minuten", AktorMinOn, AktorMinOff);
createData(565-30, Line+2, OUT);
put_string(565-30, Line+27, OUT, GREY);
}
else if (AktorTyp == 10){
put_string(405+6, Line-14, "Zeit", WHITE);
put_string(405+6, Line-16, "Zeit", WHITE);
snprintf (OUT, (size_t)100, "On: %s", AktorTimerOn);
createData(565-30, Line-22, OUT);
put_string(565-30, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Off: %s", AktorTimerOff);
createData(565-30, Line-10, OUT);
put_string(565-30, Line+12, OUT, GREY);
}
}
return 1;
Expand Down Expand Up @@ -369,15 +369,15 @@ int makeAktorFrame()
{
if (useAktor == 1){
drawAktorFrame(Aktor1Typ, Aktor1PowerOn, Aktor1PowerOff, Aktor1PercentOn, Aktor1PercentOff,
Aktor1TimerOn, Aktor1TimerOff, Aktor1MinOn, Aktor1MinOff, "Aktor 1", Aktor1Name, R1);
Aktor1TimerOn, Aktor1TimerOff, Aktor1MinOn, Aktor1MinOff, "Aktor 1", Aktor1Name, RP1);
drawAktorFrame(Aktor2Typ, Aktor2PowerOn, Aktor2PowerOff, Aktor2PercentOn, Aktor2PercentOff,
Aktor2TimerOn, Aktor2TimerOff, Aktor2MinOn, Aktor2MinOff, "Aktor 2", Aktor2Name, R2);
Aktor2TimerOn, Aktor2TimerOff, Aktor2MinOn, Aktor2MinOff, "Aktor 2", Aktor2Name, RP2);
drawAktorFrame(Aktor3Typ, Aktor3PowerOn, Aktor3PowerOff, Aktor3PercentOn, Aktor3PercentOff,
Aktor3TimerOn, Aktor3TimerOff, Aktor3MinOn, Aktor3MinOff, "Aktor 3", Aktor3Name, R3);
Aktor3TimerOn, Aktor3TimerOff, Aktor3MinOn, Aktor3MinOff, "Aktor 3", Aktor3Name, RP3);
drawAktorFrame(Aktor4Typ, Aktor4PowerOn, Aktor4PowerOff, Aktor4PercentOn, Aktor4PercentOff,
Aktor4TimerOn, Aktor4TimerOff, Aktor4MinOn, Aktor4MinOff, "Aktor 4", Aktor4Name, R4);
Aktor4TimerOn, Aktor4TimerOff, Aktor4MinOn, Aktor4MinOff, "Aktor 4", Aktor4Name, RP4);
drawAktorFrame(Aktor5Typ, Aktor5PowerOn, Aktor5PowerOff, Aktor5PercentOn, Aktor5PercentOff,
Aktor5TimerOn, Aktor5TimerOff, Aktor5MinOn, Aktor5MinOff, "Aktor 5", Aktor5Name, R5);
Aktor5TimerOn, Aktor5TimerOff, Aktor5MinOn, Aktor5MinOff, "Aktor 5", Aktor5Name, RP5);
return 1;
}
return 0;
Expand All @@ -388,11 +388,11 @@ int makeAktorState()
int PowerGrid = readRscp(PosGrid);
int PowerPVI = readRscp(PosPVI);
int BatterySOC = readRscp(PosSOC);
drawAktorState(Aktor1Typ, Aktor1Prio, Aktor1Pin, R1, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor2Typ, Aktor2Prio, Aktor2Pin, R2, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor3Typ, Aktor3Prio, Aktor3Pin, R3, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor4Typ, Aktor4Prio, Aktor4Pin, R4, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor5Typ, Aktor5Prio, Aktor5Pin, R5, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor1Typ, Aktor1Prio, Aktor1Pin, RP1, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor2Typ, Aktor2Prio, Aktor2Pin, RP2, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor3Typ, Aktor3Prio, Aktor3Pin, RP3, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor4Typ, Aktor4Prio, Aktor4Pin, RP4, PowerGrid, PowerPVI, BatterySOC);
drawAktorState(Aktor5Typ, Aktor5Prio, Aktor5Pin, RP5, PowerGrid, PowerPVI, BatterySOC);
return 1;
}
return 0;
Expand Down
4 changes: 3 additions & 1 deletion External/LedMain.c
Expand Up @@ -52,7 +52,7 @@
#include <linux/input.h>
#include <linux/ioctl.h>
#include <sys/sysinfo.h>
#include "../parameter.h"
#include "../checkPara.h"
#include "../Frame/framebuffer.c"
#include "../Frame/DrawImage.h"
#include "../Frame/DrawCorner.c"
Expand Down Expand Up @@ -381,6 +381,8 @@ int PVI_TRACKER_Color()

int main(void)
{
//Parameter einbinden, checken oder default setzen
checkDefinePara(0);

ws2811_return_t ret;
setup_handlers();
Expand Down
26 changes: 13 additions & 13 deletions External/dht.h
Expand Up @@ -167,11 +167,11 @@ int drawDHTState(int DHTUse, int DHTPin, int DHTPosition, char *DHTName, int Lin
}
drawSquare(45+120,Line-17,225,54,WHITE);
drawCorner(45+120,Line-17,225,54,GREY);
createData(205-30, Line-28, DHTName);
put_string(205-30, Line-18, DHTName, GREY);
snprintf (OUT, (size_t)100, "Temperatur %.1f %cC", DHTTemp, 248);
createData(205-30, Line-16, OUT);
put_string(205-30, Line-3, OUT, GREY);
snprintf (OUT, (size_t)100, "Luftfeuchtigkeit %.1f %%", DHTHum);
createData(205-30, Line-4, OUT);
put_string(205-30, Line+12, OUT, GREY);
}
else {
drawSquare(45+80, Line,20,20,LTGREY);
Expand All @@ -182,11 +182,11 @@ int drawDHTState(int DHTUse, int DHTPin, int DHTPosition, char *DHTName, int Lin
int makeDHTFrame()
{
if (useDHT == 1){
drawDHTFrame(DHT1Use, "Sensor 1", R1);
drawDHTFrame(DHT2Use, "Sensor 2", R2);
drawDHTFrame(DHT3Use, "Sensor 3", R3);
drawDHTFrame(DHT4Use, "Sensor 4", R4);
drawDHTFrame(DHT5Use, "Sensor 5", R5);
drawDHTFrame(DHT1Use, "Sensor 1", RP1);
drawDHTFrame(DHT2Use, "Sensor 2", RP2);
drawDHTFrame(DHT3Use, "Sensor 3", RP3);
drawDHTFrame(DHT4Use, "Sensor 4", RP4);
drawDHTFrame(DHT5Use, "Sensor 5", RP5);
return 1;
}
return 0;
Expand All @@ -198,15 +198,15 @@ int makeDHTState()
drawSquare(760,440,20,20,LIGHT_RED);
drawCorner(760,440,20,20,WHITE);
saveDHT(DHT1Use, DHT1Position, DHT1Pin);
drawDHTState(DHT1Use, DHT1Pin, DHT1Position, DHT1Name, R1);
drawDHTState(DHT1Use, DHT1Pin, DHT1Position, DHT1Name, RP1);
saveDHT(DHT2Use, DHT2Position, DHT2Pin);
drawDHTState(DHT2Use, DHT2Pin, DHT2Position, DHT2Name, R2);
drawDHTState(DHT2Use, DHT2Pin, DHT2Position, DHT2Name, RP2);
saveDHT(DHT3Use, DHT3Position, DHT3Pin);
drawDHTState(DHT3Use, DHT3Pin, DHT3Position, DHT3Name, R3);
drawDHTState(DHT3Use, DHT3Pin, DHT3Position, DHT3Name, RP3);
saveDHT(DHT4Use, DHT4Position, DHT4Pin);
drawDHTState(DHT4Use, DHT4Pin, DHT4Position, DHT4Name, R4);
drawDHTState(DHT4Use, DHT4Pin, DHT4Position, DHT4Name, RP4);
saveDHT(DHT5Use, DHT5Position,DHT5Pin);
drawDHTState(DHT5Use, DHT5Pin, DHT5Position, DHT5Name, R5);
drawDHTState(DHT5Use, DHT5Pin, DHT5Position, DHT5Name, RP5);
//Read Daten Ende (grüner Punkt unten rechts)
drawSquare(760,440,20,20,GREEN);
drawCorner(760,440,20,20,WHITE);
Expand Down
5 changes: 4 additions & 1 deletion External/gruenSave.c
Expand Up @@ -8,7 +8,7 @@
#include <linux/input.h>
#include <linux/ioctl.h>
#include <sys/sysinfo.h>
#include "../parameter.h"
#include "../checkPara.h"
#include "../Frame/framebuffer.c"
#include "../Frame/DrawImage.h"
#include "../Frame/DrawCorner.c"
Expand All @@ -27,6 +27,9 @@ void readWriteSendGB(char *name, char *unit, char *para, int pos, int ise)
}
void main()
{
//Parameter einbinden, checken oder default setzen
checkDefinePara(0);

char value[128];
readWriteSendGB("Verbrauch", "l", GB_CONSUMPTION, PosGB_CONSUMPTION, ISE_GB_CONSUMPTION);
readWriteSendGB("Regenerationsschritt", " ", GB_CURRENT_REGENERATION, PosGB_CURRENT_REGENERATION, ISE_GB_CURRENT_REGENERATION);
Expand Down
15 changes: 6 additions & 9 deletions GuiMain.c
Expand Up @@ -17,16 +17,10 @@ gcc -g -o GuiMain GuiMain.c -lwiringPi
#include <linux/ioctl.h>
#include <sys/sysinfo.h>
#include <wiringPi.h>
#include "parameter.h"
#include "parameterHM.h"
#include "checkPara.h"
#include "Frame/touch.h"
#include "Frame/touch.c"
#ifdef FONT_8X8
#include "Frame/framebuffer.c"
#endif
#ifdef FONT_8X16
#include "Frame/framebuffer8x16.c"
#endif
#include "Frame/framebuffer.c"
#include "Frame/DrawSkala.c"
#include "Frame/DrawLine.c"
#include "Frame/DrawSOC.c"
Expand All @@ -43,6 +37,9 @@ gcc -g -o GuiMain GuiMain.c -lwiringPi

//####################################
int main(){
//Parameter einbinden, checken oder default setzen
checkDefinePara(0);

picturePosition();
writeScreen(ScreenCounter, 0);
makeAktor();
Expand All @@ -63,7 +60,7 @@ int main(){

int rawX, rawY, rawPressure, scaledX, scaledY;

int GuiTime, change = 0, changeStop = 0, saveGBstate = 0;
int GuiTime, change = 1, changeStop = 0, saveGBstate = 0;
char batch[256], OUT [100],Path[100],Value[20],writeTxt[20],TimestampHM[20],RscpTimestamp[40],weatherTime[64], gruenTime[24], changepf[20];
char TAG_EMS_OUT_DATE[20], TAG_EMS_OUT_TIME[20], serialnumber[17];
int counter, ScreenSaverCounter, HistoryCounter = 15, SmartCounter = 0;
Expand Down
18 changes: 14 additions & 4 deletions Makefile
@@ -1,5 +1,6 @@
CXX ?=g++
CC ?=gcc
ROOT_CP=copyPara
ROOT_WD=watchdog
ROOT_SS=screenSave
ROOT_SSHM=screenSaveHM
Expand All @@ -11,10 +12,13 @@ ROOT_RM=RscpMain
ROOT_RSET=Rscp/RscpSet
ROOT_WBCK=Rscp/wbCheckHM
ROOT_HISTORY=S10history/S10history
ROOT_LM=External/LedMain
ROOT_TT=Frame/touchtest

all: $(ROOT_WD) $(ROOT_SS) $(ROOT_SSHM) $(ROOT_GM) $(ROOT_GB) $(ROOT_START) $(ROOT_STOP) $(ROOT_RM) $(ROOT_RSET) $(ROOT_HISTORY) $(ROOT_TT)
all: $(ROOT_CP) $(ROOT_WD) $(ROOT_SS) $(ROOT_SSHM) $(ROOT_GM) $(ROOT_START) $(ROOT_STOP) $(ROOT_RM) $(ROOT_RSET) $(ROOT_HISTORY)

$(ROOT_CP): cleanCP
$(CC) -O1 copyPara.c -o $@
$(ROOT_WD): cleanWD
$(CXX) -O1 Watchdog.cpp -o $@
$(ROOT_SS): cleanSS
Expand All @@ -30,16 +34,20 @@ $(ROOT_START): cleanSTART
$(ROOT_STOP): cleanSTOP
$(CC) -O1 stop.c -o $@
$(ROOT_RM): cleanRM
$(CXX) -O3 RscpMain.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp Rscp/RWData.cpp -o $@
$(CXX) -O3 RscpMain.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp -o $@
$(ROOT_RSET): cleanRSet
$(CXX) -O3 Rscp/RscpSet.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp Rscp/RWData.cpp -o $@
$(CXX) -O3 Rscp/RscpSet.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp -o $@
$(ROOT_WBCK): cleanWBCK
$(CC) -O1 Rscp/wbCheckHM.c -o $@
$(ROOT_HISTORY): cleanHISTORY
$(CXX) -O3 S10history/S10history.cpp S10history/RscpReader.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp Rscp/RWData.cpp -o $@
$(CXX) -O3 S10history/S10history.cpp S10history/RscpReader.cpp Rscp/RscpProtocol.cpp Rscp/AES.cpp Rscp/SocketConnection.cpp -o $@
$(ROOT_LM): cleanLM
$(CC) -O1 External/LedMain.c rpi_ws281x/mailbox.c rpi_ws281x/ws2811.c rpi_ws281x/pwm.c rpi_ws281x/pcm.c rpi_ws281x/dma.c rpi_ws281x/rpihw.c -o $@ -lwiringPi
$(ROOT_TT): cleanTT
$(CC) -O1 Frame/touchtest.c -o $@

cleanCP:
-rm $(ROOT_CP) $(VECTOR)
cleanWD:
-rm $(ROOT_WD) $(VECTOR)
cleanSS:
Expand All @@ -62,5 +70,7 @@ cleanWBCK:
-rm $(ROOT_WBCK) $(VECTOR)
cleanHISTORY:
-rm $(ROOT_HISTORY) $(VECTOR)
cleanLM:
-rm $(ROOT_LM) $(VECTOR)
cleanTT:
-rm $(ROOT_TT) $(VECTOR)

0 comments on commit 4822336

Please sign in to comment.