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

ミッションインターフェース基板追加 #22

Merged
merged 5 commits into from
Feb 24, 2024

Conversation

771-8bit
Copy link
Member

  • アップリンクでのミッション系のON/OFF機能
  • ミッション系のCAN Inspector機能

Main/Main.ino Outdated
@@ -340,6 +345,13 @@ void loop() {
if (uplink == "valve-check") {
Serial_Valve.print("valve-check\n");
}

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]

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]

}
Serial.println(msgString);
}
}

Choose a reason for hiding this comment

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

[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]

CCP.read_device();
if (CCP.id < 0x40) {
CCP.string(str_buf, 7);
snprintf(msgString, 128, "%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 🐶
If you can, use sizeof(msgString) instead of 128 as the 2nd arg to snprintf. [runtime/printf] [3]

CCP.string(str_buf, 7);
snprintf(msgString, 128, "%d,ID,%03x,time,%d000,string,%s,,,,", millis(), CCP.id, CCP.time16(), str_buf);
} else if (CCP.id < 0x80) {
snprintf(msgString, 128, "%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 🐶
If you can, use sizeof(msgString) instead of 128 as the 2nd arg to snprintf. [runtime/printf] [3]

} else if (CCP.id < 0x80) {
snprintf(msgString, 128, "%d,ID,%03x,time,%lu,uint32,%lu,,,,", millis(), CCP.id, CCP.time32(), CCP.data_uint32());
} else if (CCP.id < 0xC0) {
snprintf(msgString, 128, "%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 🐶
If you can, use sizeof(msgString) instead of 128 as the 2nd arg to snprintf. [runtime/printf] [3]

} else if (CCP.id < 0xC0) {
snprintf(msgString, 128, "%d,ID,%03x,time,%lu,float,%8.2f,,,,", millis(), CCP.id, CCP.time32(), CCP.data_float());
} else {
snprintf(msgString, 128, "%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 🐶
If you can, use sizeof(msgString) instead of 128 as the 2nd arg to snprintf. [runtime/printf] [3]

@771-8bit 771-8bit merged commit 837d332 into main Feb 24, 2024
6 checks passed
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.

1 participant