forked from gniezen/openpump
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
124 additions
and
8 deletions.
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#define LOAD_ASSETS() GD.safeload("syringe.pic"); | ||
#define SYRINGE_HANDLE 0 | ||
#define SYRINGE_WIDTH 110 | ||
#define SYRINGE_HEIGHT 50 | ||
#define SYRINGE_CELLS 1 | ||
#define ASSETS_END 11000UL | ||
static const shape_t SYRINGE_SHAPE = {0, 110, 50, 0}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#define LOAD_ASSETS() GD.safeload("syringe.pic"); | ||
#define SYRINGE_HANDLE 1 | ||
#define SYRINGE_WIDTH 110 | ||
#define SYRINGE_HEIGHT 50 | ||
#define SYRINGE_CELLS 1 | ||
#define ASSETS_END 11000UL | ||
static const shape_t SYRINGE_SHAPE = {0, 110, 50, 0}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <EEPROM.h> | ||
#include <SPI.h> | ||
#include <GD2.h> | ||
|
||
#include "spinner_assets.h" | ||
#include "default_assets.h" | ||
|
||
int i = 0; | ||
|
||
void setup() | ||
{ | ||
GD.begin(); | ||
SPIN_LOAD_ASSETS(); | ||
LOAD_ASSETS(); | ||
} | ||
|
||
void loop() | ||
{ | ||
//GD.ClearColorRGB(0x103000); | ||
GD.Clear(); | ||
GD.cmd_text(240, 68, 31, OPT_CENTER, "56.7 mL/h"); | ||
|
||
/* | ||
GD.Begin(POINTS); // draw 50-pixel wide green circles | ||
GD.ColorRGB(20, 91, 71); | ||
GD.PointSize(50 * 16); | ||
GD.BlendFunc(SRC_ALPHA, ONE); | ||
// additive blending | ||
for (int x = 100; x <= 380; x += 40) | ||
GD.Vertex2ii(x, 200); | ||
*/ | ||
|
||
GD.Begin(BITMAPS); | ||
GD.Vertex2ii(240, 110, SPIN_SPINNER_HANDLE, floor(i / 10)); | ||
i += 1; | ||
if(i>110) | ||
i = 0; | ||
|
||
GD.Vertex2ii(100, 200, SYRINGE_HANDLE); | ||
|
||
GD.swap(); | ||
} |