Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Sensor types 增加 RT_SENSOR_CLASS_POWER类型 #9399

Closed
CYFS3 opened this issue Sep 5, 2024 · 3 comments
Closed

[Feature] Sensor types 增加 RT_SENSOR_CLASS_POWER类型 #9399

CYFS3 opened this issue Sep 5, 2024 · 3 comments

Comments

@CYFS3
Copy link
Contributor

CYFS3 commented Sep 5, 2024

Describe problem solved by the proposed feature

我在修复软件包ina226时候发现他在使用设备框架注册的类型是RT_SENSOR_CLASS_POWER,但是Sensor types中并没有这个类型,是不是在什么版本抛弃了这个定义。

Describe your preferred solution

  • Sensor types中增加RT_SENSOR_CLASS_POWER
  • Sensor unit types 中添加RT_SENSOR_UNIT_MA

Describe possible alternatives

或者修改软件包ina226的设备类型为RT_SENSOR_CLASS_NONE

@kurisaW
Copy link
Contributor

kurisaW commented Sep 5, 2024

先确定他用的是哪个sensor版本,sensor.h或者sensor_v2.h中都找下看看有没有这个定义

@CYFS3
Copy link
Contributor Author

CYFS3 commented Sep 5, 2024

先确定他用的是哪个sensor版本,sensor.h或者sensor_v2.h中都找下看看有没有这个定义

v2的命名应该是 RT_SENSOR_TYPE*来命名的,所以使用的应该是sensor.h

@kurisaW
Copy link
Contributor

kurisaW commented Sep 5, 2024

可以仿照着其他类型,先设计一个power类型的sensor种类,然后提交一份草稿我再帮你审一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants