Skip to content

Commit

Permalink
FProtocolLivolo.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
avp-avp committed Jan 22, 2017
1 parent 9b0f0f9 commit d6be72b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions librf/RFProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ void CRFProtocol::EncodePacket(const string &bits, uint16_t bitrate, uint8_t *bu

for (int j = 0; j < bits; j++)
{
if (bufferSize < (bitNum+7)>>3)
throw CHaException(CHaException::ErrBadParam, "Buffer too small");

if (pulse)
buffer[bitNum >> 3] |= (1 << (7-(bitNum & 7)));

Expand Down
4 changes: 2 additions & 2 deletions librf/RFProtocolLivolo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static range_type g_timing_pulse[8] =

static const uint16_t g_transmit_data[]=
{
500, 100, 300, 0, // Pauses
500, 200, 400, 0, // Pauses
500, 100, 300, 0 // Pulses
};

Expand Down Expand Up @@ -145,7 +145,7 @@ string CRFProtocolLivolo::bits2timings(const string &bits)
{
string result;

for (int pulse= 0; pulse <= 180; pulse = pulse+1) { // how many times to transmit a command
for (int pulse= 0; pulse <= 5; pulse = pulse+1) { // how many times to transmit a command
result+="A";
bool high = true; // first pulse is always high
for_each_const(string, bits, i)
Expand Down
4 changes: 4 additions & 0 deletions libutils/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ libutils_la_SOURCES = Buffer.cpp Buffer.h Exception.cpp Exception.h \
Serializable.cpp Serializable.h XmlDocument.cpp Config.cpp Config.h \
XmlDocument.h ConfigItem.cpp ConfigItem.h libutils.cpp libutils.h locks.cpp locks.h \
logging.cpp logging.h md.h sha1c.cpp sha_locl.h stdafx.cpp stdafx.h strutils.cpp \
<<<<<<< Updated upstream
strutils.h targetver.h thread.cpp thread.h
=======
strutils.h targetver.h thread.cpp thread.h
>>>>>>> Stashed changes

AM_CFLAGS = -pthread
AM_CXXFLAGS = -pthread
Expand Down

0 comments on commit d6be72b

Please sign in to comment.