moved spark files to spark branch
This commit is contained in:
parent
ea22ccd63f
commit
af8c544653
22
spark.cc
22
spark.cc
@ -1,22 +0,0 @@
|
|||||||
#include <string>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#include "spark.h"
|
|
||||||
|
|
||||||
char getSparkByPrecentage(unsigned value) {
|
|
||||||
char ticks = " ▁▂▃▄▅▆▇█";
|
|
||||||
|
|
||||||
unsigned tickVal = (float(value) / 9);
|
|
||||||
|
|
||||||
return ticks[tickVal];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char getSparkByValue(unsigned value, unsigned max) {
|
|
||||||
char ticks = " ▁▂▃▄▅▆▇█";
|
|
||||||
|
|
||||||
unsigned tickVal = (float(value) / float(max) * 9);
|
|
||||||
|
|
||||||
return ticks[tickVal];
|
|
||||||
}
|
|
||||||
|
|
7
spark.h
7
spark.h
@ -1,7 +0,0 @@
|
|||||||
#ifndef SPARK_H_
|
|
||||||
#define SPARK_H_
|
|
||||||
|
|
||||||
char * getSparkByPrecentage(unsigned);
|
|
||||||
char * getSparkByValue(unsigned, unsigned);
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue
Block a user