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_USER = "www-data";
WEB_ACCESS_GROUP = "www-data"; WEB_ACCESS_GROUP = "www-data";
DATA_MEMORY_NAME = "mem_db.db"; DATA_MEMORY_NAME = "mem_db.db";
REPORT_FILE_NAME = "data/reports.db";
}; };
KERNEL : KERNEL :
{ {

10
Projects/la_mojo/build

@ -4,11 +4,11 @@
#make clean -e "CFG=Debug86" #make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j4 #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 clean -e "CFG=Debug_SLAVE"
#make -e "CFG=Debug_SLAVE" -j4 #make -e "CFG=Debug_SLAVE" -j4

15
lib/App/common/hardwareResourceSerialProvider.cpp

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

4
lib/App/common/hardwareResourceSerialProvider.h

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

Loading…
Cancel
Save