MWM5 Library
1.0.9
1.0.9
  • The MWM5 Library / TWELITE STAGE
  • Changes & Download
  • License
  • Getting started
    • Environment
    • Building
    • Hardware
    • Examples
      • AppTwelite_Recv
      • PAL_Recv
    • Examples (console)
      • glancer_con
    • Using Library
      • Parser
      • Terminal
  • References
    • the_app
    • Parser
      • TWESERCMD
        • IParser
        • AsciiParser
      • TWEFMT
        • TwePacket, spTwePacket
          • E_PKT
          • idenify_packet_type()
          • newTwePacket()
          • refTwePacket()
        • Packet Types
          • TwePacketAppIO
            • DataAppIO
          • TwePacketPal
            • DataPal
            • E_PAL_PCB
            • E_PAL_DATA_TYPE
            • E_CAUSE
            • PalEvent
            • PalDataInfo
            • PalBase
              • PalMag
              • PalAmb
              • PalMot
              • TweCUE
              • TweARIA
          • TwePacketActStd
            • DataAppUART (Act用)
          • TwePacketTwelite
            • DataTwelite
          • TwePacketAppUart
            • DataAppUART
    • Terminal
      • TWETERM
        • ESC Sequence
        • TermAttr
        • ITerm
        • TWETerm_M5_Console
      • TWEFONT
        • FontDef
        • createFont???()
        • drawChar()
        • queryFont()
    • Basics
      • TWE
        • IStreamOut
        • Print Formatted
      • TWEUTILS
        • FixedQueue
        • InputQueue
        • SimpleBuffer
          • SmplBuf_Byte
          • SmplBuf_ByteL<N>
          • SmplBuf_ByteSL<N>
          • SmplBuf_WChar
          • SmplBuf_WCharL<int>
GitBook提供
このページ内
PDFとしてエクスポート
  1. References
  2. Parser
  3. TWEFMT
  4. Packet Types
  5. TwePacketPal
  6. PalBase

TweCUE

TWELITE CUE(CUE)のセンサーデータ

struct TweCUE : public PalBase {
	static const int MAX_SAMPLES = 10;

	static const uint8_t U8VARS_CT = MAX_SAMPLES + 3; // センサー数
	static const uint32_t STORE_COMP_MASK = 0b1111; // 電圧と開閉状況、ADC1、加速度サンプル1あればコンプとする

	uint16_t u16Volt;	// 電源電圧
	uint16_t u16Adc1;	// ADC1電圧

	uint8_t u8MagStat;  // 開閉状況 (0:磁石が遠い, 1/2:磁石検出)
	uint8_t bMagRegularTransmit; // 定期送信の時に 1, 磁石検出では 0

	uint8_t u8samples;  // 格納サンプル数
	uint8_t u8sample_rate_code; // サンプリング周波数 (0: 25Hz, 4:100Hz)

	int16_t i16X[10]; // X軸 (ミリG)
	int16_t i16Y[10]; // Y軸
	int16_t i16Z[10]; // Z軸
};

※ パケット間の各サンプルの連続性を確認するには、パケットのシーケンス番号の抜けが無いことを確認してください。

前へPalMot次へTweARIA

最終更新 3 年前