Skip to content

Commit

Permalink
adds GetHardwareVersion method and bumps libmanta version to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ssfrr committed May 25, 2015
1 parent 651c12c commit 14bd9bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions core/MantaUSB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ int MantaUSB::GetSerialNumber(void)
return SerialNumber;
}

/************************************************************************//**
* \brief Returns the Hardware Version (1 or 2) of the attached Manta
*
* \returns The hardware version
****************************************************************************/
int MantaUSB::GetHardwareVersion(void)
{
return (SerialNumber < 70) ? 1 : 2;
}

MantaUSB::MantaTxQueueEntry *MantaUSB::GetQueuedTxMessage()
{
list<MantaTxQueueEntry *>::iterator i = txQueue.begin();
Expand Down
1 change: 1 addition & 0 deletions core/MantaUSB.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MantaUSB
void Connect(int connectionSerial = 0);
void Disconnect();
int GetSerialNumber(void);
int GetHardwareVersion(void);
bool MessageQueued(void);

static void HandleEvents(void);
Expand Down
2 changes: 1 addition & 1 deletion core/MantaVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#define _MANTAVERSION_H

#define LIBMANTA_MAJOR_VERSION 1
#define LIBMANTA_MINOR_VERSION 1
#define LIBMANTA_MINOR_VERSION 2

#endif // _MANTAVERSION_H

0 comments on commit 14bd9bb

Please sign in to comment.