0

Probably very simple, but I've spent about 4 hours combing through documentation and nothing is clear enough, or written for a version that I'm probably not using.

I have a message set up like this (I'm leaving out the TimeStamp because that's working with no problems):

message AudioMessage {
    required TimeStamp timeStamp = 1;
    repeated int32 AudioEntry = 2;
}

Which compiles to

typedef struct _AudioMessage {
    TimeStamp timeStamp;
    pb_callback_t AudioEntry;
} AudioMessage;

I want to put integers from an array into the AudioEntry field. How do I do this? Encoding and stuff goes fine.

I'd add in some examples of what I've tried already, but nothing I've tried seems to have made any sense to the compiler so far.

Sopwafel
  • 43
  • 8
  • Do you need to use the callbacks? If you know the size of your array and it is fixed you can specify the size in a settings file. When you do this the code will be generated using a plain fixed size array. – Bart Feb 25 '20 at 16:52
  • I don't need to use callbacks I believe, thanks for the suggestion. At least I can continue now, although I don't like not being able to figure this out. – Sopwafel Feb 25 '20 at 17:04
  • Kind of duplicate: https://stackoverflow.com/questions/31344214/nanopb-without-callbacks – jpa Feb 25 '20 at 18:57

0 Answers0