Skip to content
Snippets Groups Projects
Commit 0d023f72 authored by Max Horn's avatar Max Horn
Browse files

Get rid of dec2binWzerofill

parent e3960a0a
No related branches found
No related tags found
No related merge requests found
......@@ -326,7 +326,7 @@ char* RCSwitch::getCodeWordC(char sFamily, int nGroup, int nDevice, boolean bSta
return '\0';
}
const char* sDeviceGroupCode = dec2binWzerofill( (nDevice-1) + (nGroup-1)*4, 4 );
const char* sDeviceGroupCode = dec2binWcharfill( (nDevice-1) + (nGroup-1)*4, 4, '0' );
const char familycode[16][5] = {
"0000", "F000", "0F00", "FF00",
"00F0", "F0F0", "0FF0", "FFF0",
......@@ -459,7 +459,7 @@ void RCSwitch::sendTriState(const char* sCodeWord) {
}
void RCSwitch::send(unsigned long code, unsigned int length) {
this->send( this->dec2binWzerofill(code, length) );
this->send( this->dec2binWcharfill(code, length, '0') );
}
void RCSwitch::send(const char* sCodeWord) {
......@@ -709,10 +709,6 @@ void RCSwitch::handleInterrupt() {
/**
* Turns a decimal value to its binary representation
*/
char* RCSwitch::dec2binWzerofill(unsigned long Dec, unsigned int bitLength){
return dec2binWcharfill(Dec, bitLength, '0');
}
char* RCSwitch::dec2binWcharfill(unsigned long Dec, unsigned int bitLength, char fill){
static char bin[64];
unsigned int i=0;
......
......@@ -120,7 +120,6 @@ class RCSwitch {
void transmit(int nHighPulses, int nLowPulses);
void transmit(HighLow pulses);
static char* dec2binWzerofill(unsigned long dec, unsigned int length);
static char* dec2binWcharfill(unsigned long dec, unsigned int length, char fill);
#if not defined( RCSwitchDisableReceiving )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment