Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
a34d4d42
Commit
a34d4d42
authored
May 13, 2016
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some typos in flowmeter.cpp
parent
0262e147
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
flowmeter.cpp
MK/module/flowmeter/flowmeter.cpp
+4
-4
No files found.
MK/module/flowmeter/flowmeter.cpp
View file @
a34d4d42
...
@@ -33,17 +33,17 @@ void flowrate_pulsecounter();
...
@@ -33,17 +33,17 @@ void flowrate_pulsecounter();
void
flow_init
()
{
void
flow_init
()
{
flowrate
=
0
;
flowrate
=
0
;
pulsecount
=
0
;
flowrate_
pulsecount
=
0
;
flowml
=
0
;
flowml
=
0
;
pinMode
(
FLOWMETER_PIN
,
INPUT
);
pinMode
(
FLOWMETER_PIN
,
INPUT
);
attachInterrupt
(
FLOWMETER_INTERRUPT
,
flowrate_pulsecounter
,
FALLING
);
attachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
)
,
flowrate_pulsecounter
,
FALLING
);
}
}
void
flowrate_manage
()
{
void
flowrate_manage
()
{
millis_t
=
now
;
millis_t
now
;
now
=
millis
()
now
=
millis
()
if
(
ELAPSED
(
now
,
flowmeter_timer
)
{
if
(
ELAPSED
(
now
,
flowmeter_timer
)
)
{
detachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
));
detachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
));
flowrate
=
((
1000.0
/
(
now
-
flowmeter_timer
))
*
flowrate_pulsecount
)
/
FLOWMETER_CALIBRATION
;
flowrate
=
((
1000.0
/
(
now
-
flowmeter_timer
))
*
flowrate_pulsecount
)
/
FLOWMETER_CALIBRATION
;
flowmeter_timer
=
now
+
1000UL
;
flowmeter_timer
=
now
+
1000UL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment