Skip to content

Commit

Permalink
Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Mar 3, 2023
2 parents 6709338 + b42fff8 commit 9f2d79f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Hoymiles/src/parser/DevInfoParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ typedef struct {
const devInfo_t devInfo[] = {
{ { 0x10, 0x10, 0x10, ALL }, 300, "HM-300" },
{ { 0x10, 0x10, 0x20, ALL }, 350, "HM-350" },
{ { 0x10, 0x10, 0x30, ALL }, 400, "HM-400" },
{ { 0x10, 0x10, 0x40, ALL }, 400, "HM-400" },
{ { 0x10, 0x11, 0x10, ALL }, 600, "HM-600" },
{ { 0x10, 0x11, 0x20, ALL }, 700, "HM-700" },
Expand Down
18 changes: 15 additions & 3 deletions webapp/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@
<div class="row flex-row-reverse flex-wrap-reverse g-3">
<template v-for="chanType in [{obj: inverter.INV, name: 'INV'}, {obj: inverter.AC, name: 'AC'}, {obj: inverter.DC, name: 'DC'}].reverse()">
<div v-for="channel in Object.keys(chanType.obj).sort().reverse().map(x=>+x)" :key="channel" class="col">
<InverterChannelInfo :channelData="chanType.obj[channel]"
:channelType="chanType.name"
:channelNumber="channel" />
<template v-if="(chanType.name != 'DC') ||
(chanType.name == 'DC' && getSumIrridiation(inverter) == 0) ||
(chanType.name == 'DC' && getSumIrridiation(inverter) > 0 && chanType.obj[channel].Irradiation?.v || 0 > 0)
">
<InverterChannelInfo :channelData="chanType.obj[channel]"
:channelType="chanType.name"
:channelNumber="channel" />
</template>
</div>
</template>
</div>
Expand Down Expand Up @@ -669,6 +674,13 @@ export default defineComponent({
calculateAbsoluteTime(lastTime: number): string {
const date = new Date(Date.now() - lastTime * 1000);
return this.$d(date, 'datetime');
},
getSumIrridiation(inv: Inverter): number {
let total = 0;
Object.keys(inv.DC).forEach((key) => {
total += inv.DC[key as unknown as number].Irradiation?.v || 0;
});
return total;
}
},
});
Expand Down
Binary file modified webapp_dist/index.html.gz
Binary file not shown.
Binary file modified webapp_dist/js/app.js.gz
Binary file not shown.
Binary file modified webapp_dist/zones.json.gz
Binary file not shown.

0 comments on commit 9f2d79f

Please sign in to comment.