【问题标题】:Where to put code for hardware configuration in movesense Firmware Application/Whiteboard?在 movesense 固件应用程序/白板中将硬件配置代码放在哪里?
【发布时间】:2019-08-30 21:05:34
【问题描述】:

我只想在测量开始时配置一次 max30003 芯片。但是当我的代码被执行时,我不理解结构。我在 MOVESENSE_PROVIDER_DEF 的 App.cpp 中有一个模块“TestModul”。 在 TestModul 的 cpp 中,我有一些函数来更改 max30003 的寄存器,如文档 https://bitbucket.org/suunto/movesense-docs/wiki/EmbeddedSoftware/api/components/max3000x 中所述。

是否会在每次执行模块时执行?我必须把它们放在哪里?在 testmodul.cpp 中初始化/启动模块?什么时候执行模块?有没有类似主要功能的东西?

代码 og testmodul.hpp 私人的: // 初始化模块 virtual bool initModule() OVERRIDE;

// DEINIT MODUL
virtual void deinitModule() OVERRIDE;

// START MODUL
virtual bool startModule() OVERRIDE;

// STOP MODUL
virtual void stopModule() OVERRIDE { mModuleState = WB_RES::ModuleStateValues::STOPPED; }

// WB Provider onGETREQUEST
virtual void onGetRequest(..) OVERRIDE;

// WB Client onPutResult
virtual void onPutResult(..) OVERRIDE;

void writeMAX3000xRegister();

};

【问题讨论】:

    标签: movesense


    【解决方案1】:

    如果您在 startModule() 中添加设置代码,它将在框架服务启动后传感器启动时运行。

    完全免责声明:我在 Movesense 团队工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-10-02
      • 1970-01-01
      • 2010-09-08
      • 2011-11-25
      • 1970-01-01
      • 2019-07-01
      • 1970-01-01
      相关资源
      最近更新 更多