Skip to content

Commit

Permalink
removing assert statement
Browse files Browse the repository at this point in the history
  • Loading branch information
noah1510 committed Mar 19, 2021
1 parent 6cc865b commit ce00946
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ DHT_Unified dht(DHTPIN, DHTTYPE);

uint32_t delayMS;

#include "assert.h
//Like alway the library has to be included
#include "LedController.hpp"

Expand Down Expand Up @@ -140,7 +138,7 @@ float getHumidity(){
//The fourth paramether is an offset moving all digits to the left by the specified amount
void displayFloat(float value, unsigned int row = 0, unsigned int decimalPlaces = 1,unsigned int digitOffset = 0){
unsigned int total_length = NUMBER_OF_DIGITS;
assert(decimalPlaces<=NUMBER_OF_DIGITS);
if(NUMBER_OF_DIGITS<decimalPlaces){return;};

if(value < 0){
control.setChar(row,total_length-1+digitOffset,'-',false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ DHT_Unified dht(DHTPIN, DHTTYPE);

uint32_t delayMS;

#include "assert.h
//Wie immer die Bibliothek einbinden
#include "LedController.hpp"

Expand Down Expand Up @@ -141,7 +139,7 @@ float getHumidity(){
//Das vierte Parameter schiebt die angezeigte Zahl nach links.
void displayFloat(float value, unsigned int row = 0, unsigned int decimalPlaces = 1,unsigned int digitOffset = 0){
unsigned int total_length = NUMBER_OF_DIGITS;
assert(decimalPlaces<=NUMBER_OF_DIGITS);
if(NUMBER_OF_DIGITS<decimalPlaces){return;};

if(value < 0){
control.setChar(row,total_length-1+digitOffset,'-',false);
Expand Down

0 comments on commit ce00946

Please sign in to comment.