esp32 fixes

git-svn-id: svn://db.shs.com.ru/pip@878 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2020-02-18 15:20:54 +00:00
parent 081ae0768a
commit e39f03a3ac
7 changed files with 23 additions and 10 deletions

View File

@@ -118,6 +118,9 @@ PICout::PICout(PIFlags<PICoutControl> controls): fo_(true), cc_(false), fc_(fals
init();
}
PICout::PICout(PICoutControl control): fo_(true), cc_(false), fc_(false), act_(true), cnb_(10), co_(control) {
init();
}
PICout::PICout(bool active): fo_(true), cc_(false), fc_(false), act_(active), cnb_(10), co_(PICoutManipulators::DefaultControls) {
if (act_)

View File

@@ -115,7 +115,8 @@ namespace PICoutManipulators {
class PIP_EXPORT PICout {
public:
//! Default constructor with default features (AddSpaces and AddNewLine)
explicit PICout(PIFlags<PICoutManipulators::PICoutControl> controls = PICoutManipulators::DefaultControls);
PICout(PIFlags<PICoutManipulators::PICoutControl> controls = PICoutManipulators::DefaultControls);
PICout(PICoutManipulators::PICoutControl control = PICoutManipulators::DefaultControls);
//! Construct with default features (AddSpaces and AddNewLine), but if \"active\" is false does nothing
PICout(bool active);

View File

@@ -76,9 +76,9 @@ public:
void send(const PIByteArray & data);
//! Receive data part. If packet is ready, raise \a received() event
void received(const PIByteArray & data);
void receivedBA(const PIByteArray & data);
EVENT_HANDLER2(void, received, uchar * , readed, int, size) {received(PIByteArray(readed, size));}
EVENT_HANDLER2(void, received, uchar * , readed, int, size);
//! Connect \"dev\" \a PIIODevice::threadedReadEvent() event to \a received() handler
//! and \a sendRequest() event to \"dev\" \a PIIODevice::write() handler

View File

@@ -197,14 +197,14 @@ void PISystemMonitor::run() {
if (t->isPIObject())
tbid[t->tid()] = t->name();
pitc->unlock();
//piCout << tbid.keys().toType<uint>();
ProcessStats tstat;
tstat.ID = pID_;
#ifdef FREERTOS
piForeach (PIThread * t, tv)
if (t->isPIObject())
gatherThread(t->tid());
#else
//piCout << tbid.keys().toType<uint>();
ProcessStats tstat;
tstat.ID = pID_;
#ifndef WINDOWS
tbid[pID_] = "main";
# ifdef MAC_OS

View File

@@ -313,9 +313,10 @@ bool PIThread::_startThread(void * func) {
pthread_setname_np(((PIString&)name().elided(15, 0.4f).resize(15, '\0')).dataAscii());
pthread_threadid_np(PRIVATE->thread, (__uint64_t*)&tid_);
# else
pthread_setname_np(PRIVATE->thread, ((PIString&)name().elided(15, 0.4f).resize(15, '\0')).dataAscii());
# ifdef FREERTOS
tid_ = PRIVATE->thread;
# else
pthread_setname_np(PRIVATE->thread, ((PIString&)name().elided(15, 0.4f).resize(15, '\0')).dataAscii());
# endif
# endif
#else