Hi,

In the last version (43), i not found GetCustomMsg function.

getCustomMsgSize() exist.

Dominique.

 

dom14

7 years 10 months ago

Is it possible to add a function to put customMsgSize = 0 ?

for example "clearCustomMsg()"

So in MrlComm.cpp i add

 
void clearCustomMsg()
{
  customMsgSize = 0;
}
 
void getCustomMsg(byte *msg)
{
  int i;
  byte *ucPtr;
 
  ucPtr = msg;
 
  if (customMsgSize != 0)
  {
    for (i = 0; i < customMsgSize)
    {
      *(ucPtr++) = customMsgBuffer[i];
    }
  }
}
 

Hi Dom14,

  We could add the message, but I guess the first thing I want to ask is what are you trying to do that you need this new peice of functionality?  Perhaps there's a different way to do what you want already?

 

Best,

  -Kevin

dom14

7 years 10 months ago

Hi,

First: In MrlComm.h there is getCustomMsg() but in MrlComm.cpp is missing. So for me it is not normal.

Second: if i want process custom message, i can't clear custom message buffer.

I try to make Activator based on MrlComm. So i update only MrlComm.ino (Activator.ino) without modify the others files. The aim of Activator is control all power supply for InMoov, JAW servo controled with audio signal, NEO ring controled with audio signal, watchdog supervisor for reboot PC if his broken. When InMoov is shutdown, Activator is in sleep mode but always powered.

Dom

some times ago I add the customMsg so custom arduino code can use MRLComm to communicate in both way with MRL/python

 

Dom, there may be another way that I'm working on. It will allow to send/receive data thru serial of mega to use with any serial device (arduino or sensor) without using MRLComm as library.

But it`s still not ready

 

Hi

You can see my project here : https://github.com/moz4r/Activator

For the moment, Activator arduino software is based on MrlComm version 40. I modify MrlComm.cpp and .h

My aim with the futur version is not modify all files, just make the ino file.

Activator has 2 modes, stand alone and run mode with MyRobotLab. In stand alone mode, Activator process sleep, presence sensor and control relay power for InMoov.

You can see on my schematics, all functionnalities.

(sorry for my bad english)

Dom.