mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
Fixed price config
This commit is contained in:
parent
77873f4a38
commit
3a980fac4c
@ -106,8 +106,8 @@ float PriceService::getValueForHour(uint8_t direction, time_t ts, int8_t hour) {
|
||||
return ret;
|
||||
|
||||
tmElements_t tm;
|
||||
breakTime(tz->toLocal(ts + (hour) * SECS_PER_HOUR), tm);
|
||||
uint8_t day = 0x01 << (tm.Wday - 2);
|
||||
breakTime(tz->toLocal(ts + (hour * SECS_PER_HOUR)), tm);
|
||||
uint8_t day = 0x01 << ((tm.Wday+5)%7);
|
||||
uint32_t hrs = 0x01 << tm.Hour;
|
||||
|
||||
for (uint8_t i = 0; i < priceConfig.size(); i++) {
|
||||
@ -137,8 +137,8 @@ float PriceService::getValueForHour(uint8_t direction, time_t ts, int8_t hour) {
|
||||
|
||||
float PriceService::getEnergyPriceForHour(uint8_t direction, time_t ts, int8_t hour) {
|
||||
tmElements_t tm;
|
||||
breakTime(tz->toLocal(ts + (hour) * SECS_PER_HOUR), tm);
|
||||
uint8_t day = 0x01 << (tm.Wday - 2);
|
||||
breakTime(tz->toLocal(ts + (hour * SECS_PER_HOUR)), tm);
|
||||
uint8_t day = 0x01 << ((tm.Wday+5)%7);
|
||||
uint32_t hrs = 0x01 << tm.Hour;
|
||||
|
||||
float value = PRICE_NO_VALUE;
|
||||
|
||||
2
lib/SvelteUi/app/dist/index.js
vendored
2
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -143,26 +143,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap mr-3">
|
||||
<select name="rsm" class="in-f" bind:value={c.s.m}>
|
||||
<select name="rsd" class="in-f" bind:value={c.s.d}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 31} as _,i}
|
||||
<option value={i+1}>{i+1}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<select name="rsd" class="in-m" bind:value={c.s.d}>
|
||||
<select name="rsm" class="in-m" bind:value={c.s.m}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 12} as _,i}
|
||||
<option value={i+1}>{translations.months?.[i]}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<input class="in-m" disabled value="to" style="width: 20px;color:#888;"/>
|
||||
<select name="rem" class="in-m" bind:value={c.e.m}>
|
||||
<select name="red" class="in-m" bind:value={c.e.d}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 31} as _,i}
|
||||
<option value={i+1}>{i+1}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<select name="red" class="in-l" bind:value={c.e.d}>
|
||||
<select name="rem" class="in-l" bind:value={c.e.m}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 12} as _,i}
|
||||
<option value={i+1}>{translations.months?.[i]}</option>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user