Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development
This commit is contained in:
commit
9f2d79f2dc
@ -17,6 +17,7 @@ typedef struct {
|
|||||||
const devInfo_t devInfo[] = {
|
const devInfo_t devInfo[] = {
|
||||||
{ { 0x10, 0x10, 0x10, ALL }, 300, "HM-300" },
|
{ { 0x10, 0x10, 0x10, ALL }, 300, "HM-300" },
|
||||||
{ { 0x10, 0x10, 0x20, ALL }, 350, "HM-350" },
|
{ { 0x10, 0x10, 0x20, ALL }, 350, "HM-350" },
|
||||||
|
{ { 0x10, 0x10, 0x30, ALL }, 400, "HM-400" },
|
||||||
{ { 0x10, 0x10, 0x40, ALL }, 400, "HM-400" },
|
{ { 0x10, 0x10, 0x40, ALL }, 400, "HM-400" },
|
||||||
{ { 0x10, 0x11, 0x10, ALL }, 600, "HM-600" },
|
{ { 0x10, 0x11, 0x10, ALL }, 600, "HM-600" },
|
||||||
{ { 0x10, 0x11, 0x20, ALL }, 700, "HM-700" },
|
{ { 0x10, 0x11, 0x20, ALL }, 700, "HM-700" },
|
||||||
|
|||||||
@ -95,9 +95,14 @@
|
|||||||
<div class="row flex-row-reverse flex-wrap-reverse g-3">
|
<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()">
|
<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">
|
<div v-for="channel in Object.keys(chanType.obj).sort().reverse().map(x=>+x)" :key="channel" class="col">
|
||||||
<InverterChannelInfo :channelData="chanType.obj[channel]"
|
<template v-if="(chanType.name != 'DC') ||
|
||||||
:channelType="chanType.name"
|
(chanType.name == 'DC' && getSumIrridiation(inverter) == 0) ||
|
||||||
:channelNumber="channel" />
|
(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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@ -669,6 +674,13 @@ export default defineComponent({
|
|||||||
calculateAbsoluteTime(lastTime: number): string {
|
calculateAbsoluteTime(lastTime: number): string {
|
||||||
const date = new Date(Date.now() - lastTime * 1000);
|
const date = new Date(Date.now() - lastTime * 1000);
|
||||||
return this.$d(date, 'datetime');
|
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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user