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
331fbeba
Commit
331fbeba
authored
8 years ago
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert digital pin to interrupt
parent
cbd83075
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
flowmeter.cpp
MK/module/flowmeter/flowmeter.cpp
+2
-2
No files found.
MK/module/flowmeter/flowmeter.cpp
View file @
331fbeba
...
...
@@ -43,13 +43,13 @@ void flowrate_manage() {
millis_t
=
now
;
now
=
millis
()
if
(
ELAPSED
(
now
,
flowmeter_timer
)
{
detachInterrupt
(
FLOWMETER_INTERRUPT
);
detachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
)
);
flowrate
=
((
1000.0
/
(
now
-
flowmeter_timer
))
*
flowrate_pulsecount
)
/
FLOWMETER_CALIBRATION
;
flowmeter_timer
=
now
+
1000UL
;
flowml
=
(
flowrate
/
60
)
*
1000
;
pulseCount
=
0
;
attachInterrupt
(
FLOWMETER_INTERRUPT
,
flowrate_pulsecounter
,
FALLING
);
attachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
)
,
flowrate_pulsecounter
,
FALLING
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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