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
252fa2d0
Commit
252fa2d0
authored
May 31, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync with upstream
parent
81e4f5c9
Pipeline
#52
skipped
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
431 additions
and
523 deletions
+431
-523
flowmeter.cpp
MK/module/flowmeter/flowmeter.cpp
+0
-74
flowmeter.h
MK/module/flowmeter/flowmeter.h
+0
-31
dogm_lcd_implementation.h
MK/module/lcd/dogm_lcd_implementation.h
+0
-1
ultralcd.cpp
MK/module/lcd/ultralcd.cpp
+431
-417
No files found.
MK/module/flowmeter/flowmeter.cpp
deleted
100644 → 0
View file @
81e4f5c9
/*
flowmeter.cpp - Flowmeter control library for Arduino - Version 1
Copyright (c) 2016 Franco (nextime) Lanza. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../../base.h"
#include <Arduino.h>
#if ENABLED(FLOWMETER_SENSOR)
volatile
int
flowrate_pulsecount
;
float
flowrate
;
static
millis_t
flowmeter_timer
=
0
;
static
millis_t
lastflow
=
0
;
void
flowrate_pulsecounter
();
void
flow_init
()
{
flowrate
=
0
;
flowrate_pulsecount
=
0
;
pinMode
(
FLOWMETER_PIN
,
INPUT
);
attachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
),
flowrate_pulsecounter
,
FALLING
);
}
void
flowrate_manage
()
{
millis_t
now
;
now
=
millis
();
if
(
ELAPSED
(
now
,
flowmeter_timer
))
{
detachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
));
flowrate
=
(
float
)(((
1000.0
/
(
float
)((
float
)
now
-
(
float
)
lastflow
))
*
(
float
)
flowrate_pulsecount
)
/
(
float
)
FLOWMETER_CALIBRATION
);
#if ENABLED(FLOWMETER_DEBUG)
ECHO_M
(
" FLOWMETER DEBUG "
);
ECHO_MV
(
" flowrate:"
,
flowrate
);
ECHO_MV
(
" flowrate_pulsecount:"
,
flowrate_pulsecount
);
ECHO_MV
(
" CALIBRATION:"
,
FLOWMETER_CALIBRATION
);
ECHO_E
;
#endif
flowmeter_timer
=
now
+
1000UL
;
lastflow
=
now
;
flowrate_pulsecount
=
0
;
attachInterrupt
(
digitalPinToInterrupt
(
FLOWMETER_PIN
),
flowrate_pulsecounter
,
FALLING
);
}
}
float
get_flowrate
()
{
return
flowrate
;
}
void
flowrate_pulsecounter
()
{
// Increment the pulse counter
flowrate_pulsecount
++
;
}
#endif // FLOWMETER_SENSOR
MK/module/flowmeter/flowmeter.h
deleted
100644 → 0
View file @
81e4f5c9
/*
flowmeter.h - Flowmeter control library for Arduino - Version 1
Copyright (c) 2016 Franco (nextime) Lanza. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef FLOWMETER_H
#define FLOWMETER_H
#define FLOWMETER_CALIBRATION (FLOWMETER_MAXFREQ/FLOWMETER_MAXFLOW)
#if ENABLED(FLOWMETER_SENSOR)
void
flowrate_manage
();
void
flow_init
();
float
get_flowrate
();
#endif
#endif // FLOWMETER_H
MK/module/lcd/dogm_lcd_implementation.h
View file @
252fa2d0
...
@@ -484,7 +484,6 @@ static void lcd_implementation_status_screen() {
...
@@ -484,7 +484,6 @@ static void lcd_implementation_status_screen() {
#endif
#endif
#endif // !LASERBEAM
#endif // !LASERBEAM
#endif // DISABLED LASER
// Fan
// Fan
u8g
.
setPrintPos
(
104
,
27
);
u8g
.
setPrintPos
(
104
,
27
);
#if HAS(FAN)
#if HAS(FAN)
...
...
MK/module/lcd/ultralcd.cpp
View file @
252fa2d0
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