Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
avrcte
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leger
avrcte
Commits
13860ec2
Commit
13860ec2
authored
5 months ago
by
Jean-Benoist Leger
Browse files
Options
Downloads
Patches
Plain Diff
force close only once, and with a order
parent
7f2c3e9c
No related branches found
Branches containing commit
Tags
v1.7
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
debit.c
+1
-1
1 addition, 1 deletion
debit.c
orders.c
+12
-0
12 additions, 0 deletions
orders.c
orders.h
+1
-0
1 addition, 0 deletions
orders.h
status.c
+1
-0
1 addition, 0 deletions
status.c
status.h
+1
-0
1 addition, 0 deletions
status.h
with
16 additions
and
1 deletion
debit.c
+
1
−
1
View file @
13860ec2
...
...
@@ -57,7 +57,7 @@ void debit_update()
{
if
(
status
.
consecutive_closed_debit
==
5
)
{
vanne_
force_close
()
;
orders
.
force_close
_ev
=
1
;
status
.
consecutive_closed_debit
=
0
;
}
else
...
...
This diff is collapsed.
Click to expand it.
orders.c
+
12
−
0
View file @
13860ec2
...
...
@@ -8,6 +8,7 @@ void do_orders()
{
vanne_step_open
(
orders
.
open_ev_step_value
,
1
);
orders
.
open_ev_step
=
0
;
status
.
force_closed
=
0
;
}
if
(
orders
.
close_ev_step
)
{
...
...
@@ -18,16 +19,27 @@ void do_orders()
{
vanne_open
();
orders
.
open_ev
=
0
;
status
.
force_closed
=
0
;
}
if
(
orders
.
close_ev
)
{
vanne_close
();
orders
.
close_ev
=
0
;
}
if
(
orders
.
force_close_ev
)
{
if
(
!
status
.
force_closed
)
{
vanne_force_close
();
status
.
force_closed
=
1
;
}
orders
.
force_close_ev
=
0
;
}
if
(
orders
.
vidange_ev
)
{
vanne_vidange
();
orders
.
vidange_ev
=
0
;
status
.
force_closed
=
0
;
}
if
(
orders
.
write_config
)
{
...
...
This diff is collapsed.
Click to expand it.
orders.h
+
1
−
0
View file @
13860ec2
...
...
@@ -11,6 +11,7 @@ typedef struct orders_struct
uint16_t
close_ev_step_value
;
uint8_t
open_ev
;
uint8_t
close_ev
;
uint8_t
force_close_ev
;
uint8_t
vidange_ev
;
uint8_t
get_T
;
uint8_t
write_config
;
...
...
This diff is collapsed.
Click to expand it.
status.c
+
1
−
0
View file @
13860ec2
...
...
@@ -16,4 +16,5 @@ void status_init()
status
.
temperature_cold_water
=
20
;
status
.
temperature_hot_water
=
20
;
status
.
consecutive_closed_debit
=
0
;
status
.
force_closed
=
0
;
}
This diff is collapsed.
Click to expand it.
status.h
+
1
−
0
View file @
13860ec2
...
...
@@ -22,6 +22,7 @@ typedef struct status_struct
float
temperature_cold_water
;
float
temperature_hot_water
;
uint16_t
consecutive_closed_debit
;
uint8_t
force_closed
;
}
status_t
;
extern
status_t
status
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment