UdonLibrary
1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
Switch.hpp
[詳解]
1
//
2
// 通信用メッセージ
3
//
4
// Copyright (c) 2022 udonrobo
5
//
6
7
#pragma once
8
9
#include <
Udon/Traits/EnumerableMacro.hpp
>
10
11
namespace
Udon
12
{
13
14
namespace
Message
15
{
16
18
struct
Switch
19
{
20
22
bool
press
;
23
24
#ifdef ARDUINO
26
void
show()
const
27
{
28
Serial.print(
press
?
F
(
"press"
) :
F
(
"not press"
));
29
Serial.print(
'\t'
);
30
}
31
#endif
32
33
UDON_ENUMERABLE
(
press
);
34
};
35
36
}
// namespace Message
37
38
}
// namespace Udon
EnumerableMacro.hpp
F
#define F(x)
Definition
Show.hpp:17
Udon::Message
Definition
AirCylinder.hpp:16
Udon
Definition
Bit.hpp:12
Udon::Message::Switch
スイッチ
Definition
Switch.hpp:19
Udon::Message::Switch::UDON_ENUMERABLE
UDON_ENUMERABLE(press)
Udon::Message::Switch::press
bool press
ボタンが押されているか
Definition
Switch.hpp:22