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

圧力測定基板追加 #24

Merged
merged 6 commits into from
Mar 19, 2024
Merged

圧力測定基板追加 #24

merged 6 commits into from
Mar 19, 2024

Conversation

771-8bit
Copy link
Member

CCP.read_device();
if (CCP.id < 0x40) {
CCP.string(str_buf, 7);
sprintf(msgString, "%d,ID,%03x,time,%d000,string,%s,,,,", millis(), CCP.id, CCP.time16(), str_buf);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

CCP.string(str_buf, 7);
sprintf(msgString, "%d,ID,%03x,time,%d000,string,%s,,,,", millis(), CCP.id, CCP.time16(), str_buf);
} else if (CCP.id < 0x80) {
sprintf(msgString, "%d,ID,%03x,time,%lu,uint32,%lu,,,,", millis(), CCP.id, CCP.time32(), CCP.data_uint32());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

} else if (CCP.id < 0x80) {
sprintf(msgString, "%d,ID,%03x,time,%lu,uint32,%lu,,,,", millis(), CCP.id, CCP.time32(), CCP.data_uint32());
} else if (CCP.id < 0xC0) {
sprintf(msgString, "%d,ID,%03x,time,%lu,float,%8.2f,,,,", millis(), CCP.id, CCP.time32(), CCP.data_float());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

} else if (CCP.id < 0xC0) {
sprintf(msgString, "%d,ID,%03x,time,%lu,float,%8.2f,,,,", millis(), CCP.id, CCP.time32(), CCP.data_float());
} else {
sprintf(msgString, "%d,ID,%03x,time,%d000,fp16_0,%8.2f,fp16_1,%8.2f,fp16_2,%8.2f", millis(), CCP.id, CCP.time16(), CCP.data_fp16_0(), CCP.data_fp16_1(), CCP.data_fp16_2());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

if (CCP.id < 0x40)
{
CCP.string(str_buf, 7);
sprintf(msgString, "%d,ID,%03x,time,%d000,string,%s,,,,", millis(), CCP.id, CCP.time16(), str_buf);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

}
else if (CCP.id < 0x80)
{
sprintf(msgString, "%d,ID,%03x,time,%lu,uint32,%lu,,,,", millis(), CCP.id, CCP.time32(), CCP.data_uint32());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

}
else if (CCP.id < 0xC0)
{
sprintf(msgString, "%d,ID,%03x,time,%lu,float,%8.2f,,,,", millis(), CCP.id, CCP.time32(), CCP.data_float());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

}
else
{
sprintf(msgString, "%d,ID,%03x,time,%d000,fp16_0,%8.2f,fp16_1,%8.2f,fp16_2,%8.2f", millis(), CCP.id, CCP.time16(), CCP.data_fp16_0(), CCP.data_fp16_1(), CCP.data_fp16_2());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Never use sprintf. Use snprintf instead. [runtime/printf] [5]

@771-8bit 771-8bit requested a review from mikito5hoda March 19, 2024 06:24
@771-8bit
Copy link
Member Author

FM実機で動作確認したのでOK

@771-8bit 771-8bit merged commit 7936bf3 into main Mar 19, 2024
6 of 7 checks passed
@771-8bit 771-8bit mentioned this pull request Mar 19, 2024
4 tasks
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

Successfully merging this pull request may close these issues.

2 participants