Skip to content

nesall/ms3_protocol_buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MS3ProtocolBuffer helps read data from MegaSquirt3 ECUs. Tested on MS3Pro Evo (which is basically MS3). Should work on other versions too (but not tested.)

Example usage:

  private MS3ProtocolBuffer protocolBuffer = new MS3ProtocolBuffer();

  private MyAsyncReader serialCallback = new MyAsyncReader() {
    @Override
    public void onReceiveData(byte[] data) {
      if (data == null)
        return;
      try {
        protocolBuffer.appendData(data);
        while (protocolBuffer.hasMoreCommands()) {
          byte[] message = protocolBuffer.nextBinaryCommand(); // Extract full message
          // TODO: work with message
          // message is a complete message. It is not truncated nor does it have any extra bytes.
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  };

MyAsyncReader can be any serial reader, e.g. felHR85/UsbSerial for Android.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages