Skip to content

Commit 11bfb62

Browse files
author
Peter Wegmann
committed
fixed flickering pressure and coord identifier during filling mode
1 parent 8a91319 commit 11bfb62

File tree

7 files changed

+30
-116
lines changed

7 files changed

+30
-116
lines changed

Controller/filling_mode.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Controller_Model_filling filling_model ={
4949
.super.mode = &global_mode,
5050
.super.vtable = &filling_Vtable,
5151
.super.batt_check = true,
52-
.meas_progress = 0
52+
.meas_progress = 0,
53+
.t_last_presss_meas = 0
5354
};
5455

5556
Controller_Model_filling * get_fill_model(){
@@ -318,12 +319,18 @@ void filling_pressedNONE(Controller_Model *Model){
318319
: draw_current_wait_time(X_M_60+xoff, Y_M_90, LVM.options->transmit_fast*60, filling_model.meas_progress, ERR);
319320

320321
// enter pressure
321-
if (HoneywellSSC_status.connected)
322+
if (/*HoneywellSSC_status.connected && */(count_t_elapsed%3 == 0) && (count_t_elapsed != filling_model.t_last_presss_meas ) )
322323
{
323-
LVM.vars->pressure_level = 0;
324-
HoneywellSSC_read_pressure();
325-
if (HoneywellSSC_status.status < 4) LVM.vars->pressure_level = HoneywellSSC_Pressure;
324+
325+
326+
filling_model.t_last_presss_meas = count_t_elapsed;
327+
//LVM.vars->pressure_level = 0;
328+
//HoneywellSSC_read_pressure();
329+
//if (HoneywellSSC_status.status < 4) LVM.vars->pressure_level = HoneywellSSC_Pressure;
330+
331+
LVM.vars->pressure_level++;
326332
paint_time_pressure(Time, LVM.vars->pressure_level, 1); // update mode
333+
327334
}
328335

329336
}

Controller/filling_mode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ typedef struct
1919
{
2020
Controller_Model super;
2121
uint8_t meas_progress;
22+
uint32_t t_last_presss_meas;
2223
}Controller_Model_filling;
2324

2425

LHe-Level-Meter.atsln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Global
1919
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.DISP_3000-DEFAULT|AVR.Build.0 = DISP_3000-DEFAULT|AVR
2020
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.DISP_3000-ILL|AVR.ActiveCfg = DISP_3000-ILL|AVR
2121
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.DISP_3000-ILL|AVR.Build.0 = DISP_3000-ILL|AVR
22-
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-DEFAULT|AVR.ActiveCfg = DISP_3000-ILL|AVR
23-
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-DEFAULT|AVR.Build.0 = DISP_3000-ILL|AVR
22+
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-DEFAULT|AVR.ActiveCfg = ili9341-DEFAULT|AVR
23+
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-DEFAULT|AVR.Build.0 = ili9341-DEFAULT|AVR
2424
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-ILL|AVR.ActiveCfg = ili9341-ILL|AVR
2525
{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.ili9341-ILL|AVR.Build.0 = ili9341-ILL|AVR
2626
EndGlobalSection

LHe-Level-Meter.cproj

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -102,110 +102,6 @@
102102
<ToolName xmlns="">Custom Programming Tool</ToolName>
103103
</custom>
104104
</PropertyGroup>
105-
<PropertyGroup Condition=" '$(Configuration)' == 'ili9341-HZB' ">
106-
<ToolchainSettings>
107-
<AvrGcc>
108-
<avrgcc.common.Device>-mmcu=atmega1284p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p"</avrgcc.common.Device>
109-
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
110-
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
111-
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
112-
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
113-
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
114-
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
115-
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
116-
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
117-
<avrgcc.compiler.symbols.DefSymbols>
118-
<ListValues>
119-
<Value>F_CPU=6144000UL</Value>
120-
<Value>DEBUG</Value>
121-
<Value>LEVELMETER</Value>
122-
<Value>USE_XBEE</Value>
123-
<Value>ili9341</Value>
124-
<Value>HZB_HE_NETWORK</Value>
125-
<Value>DEFAULT_DISP_CONFIG</Value>
126-
</ListValues>
127-
</avrgcc.compiler.symbols.DefSymbols>
128-
<avrgcc.compiler.directories.IncludePaths>
129-
<ListValues>
130-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
131-
<Value>../avr-util-library</Value>
132-
</ListValues>
133-
</avrgcc.compiler.directories.IncludePaths>
134-
<avrgcc.compiler.optimization.level>Optimize most (-O3)</avrgcc.compiler.optimization.level>
135-
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
136-
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
137-
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
138-
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
139-
<avrgcc.compiler.miscellaneous.Verbose>True</avrgcc.compiler.miscellaneous.Verbose>
140-
<avrgcc.linker.libraries.Libraries>
141-
<ListValues>
142-
<Value>libm</Value>
143-
</ListValues>
144-
</avrgcc.linker.libraries.Libraries>
145-
<avrgcc.assembler.general.AssemblerFlags>-DLEVELMETER</avrgcc.assembler.general.AssemblerFlags>
146-
<avrgcc.assembler.general.IncludePaths>
147-
<ListValues>
148-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.98\include</Value>
149-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
150-
</ListValues>
151-
</avrgcc.assembler.general.IncludePaths>
152-
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
153-
</AvrGcc>
154-
</ToolchainSettings>
155-
<OutputPath>bin\ili9341-HZB\</OutputPath>
156-
</PropertyGroup>
157-
<PropertyGroup Condition=" '$(Configuration)' == 'DISP_3000-HZB' ">
158-
<ToolchainSettings>
159-
<AvrGcc>
160-
<avrgcc.common.Device>-mmcu=atmega1284p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega1284p"</avrgcc.common.Device>
161-
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
162-
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
163-
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
164-
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
165-
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
166-
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
167-
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
168-
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
169-
<avrgcc.compiler.symbols.DefSymbols>
170-
<ListValues>
171-
<Value>F_CPU=6144000UL</Value>
172-
<Value>DEBUG</Value>
173-
<Value>LEVELMETER</Value>
174-
<Value>USE_XBEE</Value>
175-
<Value>DISP_3000</Value>
176-
<Value>HZB_HE_NETWORK</Value>
177-
<Value>DEFAULT_DISP_CONFIG</Value>
178-
</ListValues>
179-
</avrgcc.compiler.symbols.DefSymbols>
180-
<avrgcc.compiler.directories.IncludePaths>
181-
<ListValues>
182-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
183-
<Value>../avr-util-library</Value>
184-
</ListValues>
185-
</avrgcc.compiler.directories.IncludePaths>
186-
<avrgcc.compiler.optimization.level>Optimize most (-O3)</avrgcc.compiler.optimization.level>
187-
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
188-
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
189-
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
190-
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
191-
<avrgcc.compiler.miscellaneous.Verbose>True</avrgcc.compiler.miscellaneous.Verbose>
192-
<avrgcc.linker.libraries.Libraries>
193-
<ListValues>
194-
<Value>libm</Value>
195-
</ListValues>
196-
</avrgcc.linker.libraries.Libraries>
197-
<avrgcc.assembler.general.AssemblerFlags>-DLEVELMETER</avrgcc.assembler.general.AssemblerFlags>
198-
<avrgcc.assembler.general.IncludePaths>
199-
<ListValues>
200-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.0.98\include</Value>
201-
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.3.300\include</Value>
202-
</ListValues>
203-
</avrgcc.assembler.general.IncludePaths>
204-
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
205-
</AvrGcc>
206-
</ToolchainSettings>
207-
<OutputPath>bin\DISP_3000-HZB\</OutputPath>
208-
</PropertyGroup>
209105
<PropertyGroup Condition=" '$(Configuration)' == 'ili9341-ILL' ">
210106
<ToolchainSettings>
211107
<AvrGcc>

avr-util-library

config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313

1414

15-
#define FIRMWARE_VERSION 220
15+
#define FIRMWARE_VERSION 221
1616

1717
#define BRANCH_ID 1
18-
#define LAST_FIRMWARE_EEPROM_CHANGED 221
18+
#define LAST_FIRMWARE_EEPROM_CHANGED 220
1919

2020

2121

display_utilities.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ void paint_he_level(double he_level, double total_volume, _Bool print_Percentage
322322
void paint_time_pressure(struct tm ltime, double lpress, _Bool update)
323323
{
324324

325+
325326
char temp[15];
326327

327328
if (!update) LCD_Print(" ", xoff + X_PTP_2, Y_PTP_20, 2, 1, 1, FGC, BGC); // clears line (not necessary if in update mode)
@@ -331,8 +332,12 @@ void paint_time_pressure(struct tm ltime, double lpress, _Bool update)
331332
LCD_Print(temp, xoff + X_PTP_2, Y_PTP_20, 2, 1, 1, ERR, BGC);
332333

333334

334-
LCD_Print(" ",X_PTP_COORDINATOR +xoff-14*FONT1_W,Y_PTP_COORDINATOR,1,1,1,FGC,BGC);
335-
335+
336+
if (xbee.CoordIdChanged)
337+
{
338+
LCD_Print(" ",X_PTP_COORDINATOR +xoff-14*FONT1_W,Y_PTP_COORDINATOR,1,1,1,FGC,BGC);
339+
}
340+
336341
uint16_t color = FGC;
337342

338343
if (CHECK_ERROR(NETWORK_ERROR))
@@ -374,6 +379,10 @@ void paint_time_pressure(struct tm ltime, double lpress, _Bool update)
374379

375380
LCD_Print(xbee_get_coordID(),X_PTP_COORDINATOR +xoff-strlen(xbee_get_coordID())*FONT1_W,Y_PTP_COORDINATOR,1,1,1,color,BGC);
376381

382+
383+
if (!update)
384+
{
385+
377386
//autofill indicator
378387
uint8_t boxheight = AUTOFILL_BOX_WIDTH;
379388
uint16_t x0 = X_AUTOFFILL_INDICATOR+xoff;
@@ -387,6 +396,7 @@ void paint_time_pressure(struct tm ltime, double lpress, _Bool update)
387396
LCD_Box(x0,y0,x0+boxheight,y0+boxheight,green);
388397
LCD_Box(x0+1,y0+1,x0+boxheight-1,y0+boxheight-1,BGC);
389398
}
399+
}
390400

391401

392402

0 commit comments

Comments
 (0)