panda-official / TimeSwipe

PANDA Timeswipe driver and firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restructure driver output

IngoKaiser opened this issue · comments

@iluxa as we just have talked about, please make suggestion for data structure for column (signal)-wise data output.

Definition of Done

  • code for mentioned task is complete. examples & documentations are complete.

  • build chains are tested

  • corresponding branch is closed

  • merging is done

instead of Record data structure used in TimeSwipe atm:

struct Record
{
    std::array<float, 4> Sensors{0};
};

we can implement class contains bulk sensor data with random access to sensor and data each element:

class SensorsData {
    static constexpr size_t SENSORS = 4;
    std::array<std::vector<float>, SENSORS> data;
public:
    const std::vector<float> operator[](size_t num) const;
    size_t SensorsSize() const;
    size_t DataSize() const;    
};

so, SensorsData[i] is vector of data of sensor i

I think that's fine @iluxa