ardupilog icon indicating copy to clipboard operation
ardupilog copied to clipboard

Remove (empty) LogMsgGroup if filtered out?

Open hunt0r opened this issue 8 years ago • 3 comments

With the filter capability (as added in #26) it makes sense to me to delete the (empty) LogMsgGroup if it was filtered out by the user. Do you agree?

I began working on it myself, but found it's a little more complicated than I thought. Just calling "delete(obj.(msgName))" deletes the object, but doesn't get rid of the property. I haven't yet figured out an easy way to clear it completely...

(Also, we'd want to move the call to obj.findInfo() from line 65 to be inside readLog(), perhaps around line 120ish right before % Iterate over all the discovered msgs)

hunt0r avatar Apr 03 '17 14:04 hunt0r

When we filter, we might also want to delete the FMT data, I think it is saved before the filtering is applied.

hunt0r avatar Apr 03 '17 17:04 hunt0r

Regarding deleting unwanted LogMsgGroups, including FMT, I'm for it.

Regarding the location of findInfo(), I placed it there to contrast again readLog. In my head, readLog is a dumb cataloguing and distribution of the content in the correct LogMsgGroups, whereas findInfo() is about meta-information. I don't have a strong opinion on the subject, I just didn't want to overbloat readLog() without reason.

Georacer avatar Apr 03 '17 20:04 Georacer

It doesn't look like property handles can be deleted (sigh). How about we copy the structure and keep only the non-empy properties?

Georacer avatar Apr 27 '17 15:04 Georacer