Evgeny Gagua 4 years ago
parent
commit
2aa5218dfd
  1. 1
      Projects/la_mojo/Debug/server.conf
  2. 10
      Projects/la_mojo/build
  3. 15
      lib/App/common/hardwareResourceSerialProvider.cpp
  4. 4
      lib/App/common/hardwareResourceSerialProvider.h

1
Projects/la_mojo/Debug/server.conf

@ -7,6 +7,7 @@ GENERAL :
WEB_ACCESS_USER = "www-data";
WEB_ACCESS_GROUP = "www-data";
DATA_MEMORY_NAME = "mem_db.db";
REPORT_FILE_NAME = "data/reports.db";
};
KERNEL :
{

10
Projects/la_mojo/build

@ -4,11 +4,11 @@
#make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j4
make clean -e "CFG=Release86"
make -e "CFG=Release86" -j4
cd Release86
strip ./mojo
cd ..
#make clean -e "CFG=Release86"
#make -e "CFG=Release86" -j4
#cd Release86
#strip ./mojo
#cd ..
#make clean -e "CFG=Debug_SLAVE"
#make -e "CFG=Debug_SLAVE" -j4

15
lib/App/common/hardwareResourceSerialProvider.cpp

@ -441,10 +441,15 @@ bool hardwareResourceSerialProvider::create_HW(){
int result;
/* Open File Descriptor */
//m_iFID = open( DevicePath, O_RDWR| O_NONBLOCK | O_NDELAY );
#ifdef __arm__
LOG("ARM Defined!");
#else
LOG("ARM NOT Defined!");
#endif
#ifdef USE_WIRINGPI
if( strstr( m_sUartData.path, "USB" ) == NULL ){
#ifdef DEBUG
LOG("MANUAL RTS CTL");
LOG("MANUAL RTS CTL(R)");
#endif
m_bManualRTS = true;
wiringPiSetup();
@ -452,7 +457,7 @@ bool hardwareResourceSerialProvider::create_HW(){
pinMode( 0, OUTPUT );
} else {
#ifdef DEBUG
LOG("NO MANUAL RTS CTL");
LOG("NO MANUAL RTS CTL(R)");
#endif
m_bManualRTS = false;
};
@ -460,7 +465,7 @@ bool hardwareResourceSerialProvider::create_HW(){
#ifdef USE_WIRINGX
if( strstr( m_sUartData.path, "USB" ) == NULL ){
#ifdef DEBUG
LOG("MANUAL RTS CTL");
LOG("MANUAL RTS CTL(X)");
#endif
if( wiringXSetup( WIRINGX_PLATFORM, NULL ) == -1 ){
LOG_ERROR( "WiringX Platform Init Failure!" );
@ -473,14 +478,14 @@ bool hardwareResourceSerialProvider::create_HW(){
};
} else {
#ifdef DEBUG
LOG("NO MANUAL RTS CTL");
LOG("NO MANUAL RTS CTL(X)");
#endif
m_bManualRTS = false;
};
#else
#ifdef DEBUG
LOG("NO MANUAL RTS CTL");
LOG("NO MANUAL RTS CTL(_)");
#endif
m_bManualRTS = false;
#endif

4
lib/App/common/hardwareResourceSerialProvider.h

@ -21,7 +21,7 @@
#ifdef __linux__
#include <unistd.h> // UNIX standard function definitions
#include <termios.h> // POSIX terminal control definitions
#ifdef __arm__
//#ifdef __arm__ __aarch64__
#ifdef RASPI_HARDWARE
//#define USE_WIRINGPI
//#include <wiringPi.h>
@ -29,7 +29,7 @@
#define WIRINGX_PLATFORM "rock4"
#include <wiringx.h>
#endif
#endif
//#endif
#endif

Loading…
Cancel
Save