Просмотр исходного кода

Improve custom settings comments.

antirez 3 лет назад
Родитель
Сommit
41a92599c0
1 измененных файлов с 8 добавлено и 4 удалено
  1. 8 4
      custom_presets.h

+ 8 - 4
custom_presets.h

@@ -1,8 +1,8 @@
 #include <cc1101.h>
 #include <cc1101.h>
 
 
-/* This is how to configure registers MDMCFG3 and MDMCFG4.
+/* ========================== DATA RATE SETTINGS ===============================
  *
  *
- * Data rate kBaud setting:
+ * This is how to configure registers MDMCFG3 and MDMCFG4.
  *
  *
  * MDMCFG3 is the data rate mantissa, the exponent is in MDMCFG4,
  * MDMCFG3 is the data rate mantissa, the exponent is in MDMCFG4,
  * last 4 bits of the register.
  * last 4 bits of the register.
@@ -15,6 +15,8 @@
  *
  *
  * ((256+34)*(2^12))/(2^28)*26000000 = 115051.2688000000, that is 115KBaud
  * ((256+34)*(2^12))/(2^28)*26000000 = 115051.2688000000, that is 115KBaud
  *
  *
+ * ============================ BANDWIDTH FILTER ===============================
+ *
  * Bandwidth filter setting:
  * Bandwidth filter setting:
  *
  *
  * BW filter as just 16 possibilities depending on how the first nibble
  * BW filter as just 16 possibilities depending on how the first nibble
@@ -39,6 +41,8 @@
  * e 68 khz
  * e 68 khz
  * f 58 khz
  * f 58 khz
  *
  *
+ * ============================== FSK DEVIATION ================================
+ *
  * FSK deviation is controlled by the DEVIATION register. In Ruby:
  * FSK deviation is controlled by the DEVIATION register. In Ruby:
  *
  *
  * dev = (26000000.0/2**17)*(8+(deviation&7))*(2**(deviation>>4&7))
  * dev = (26000000.0/2**17)*(8+(deviation&7))*(2**(deviation>>4&7))
@@ -194,7 +198,7 @@ static uint8_t protoview_subghz_tpms3_fsk_async_regs[][2] = {
     {0, 0},
     {0, 0},
 };
 };
 
 
-/* Parameters that should work well for the TPMS PVM C210 sensor. */
+/* FSK 19k dev, 325 Khz filter, 20kBaud. Works well with Toyota. */
 static uint8_t protoview_subghz_tpms4_fsk_async_regs[][2] = {
 static uint8_t protoview_subghz_tpms4_fsk_async_regs[][2] = {
     /* GPIO GD0 */
     /* GPIO GD0 */
     {CC1101_IOCFG0, 0x0D}, // GD0 as async serial data output/input
     {CC1101_IOCFG0, 0x0D}, // GD0 as async serial data output/input
@@ -212,7 +216,7 @@ static uint8_t protoview_subghz_tpms4_fsk_async_regs[][2] = {
     {CC1101_MDMCFG2, 0x10}, // GFSK without any other check
     {CC1101_MDMCFG2, 0x10}, // GFSK without any other check
     {CC1101_MDMCFG3, 0x93}, // Data rate is 20kBaud
     {CC1101_MDMCFG3, 0x93}, // Data rate is 20kBaud
     {CC1101_MDMCFG4, 0x59}, // Rx bandwidth filter is 325 kHz
     {CC1101_MDMCFG4, 0x59}, // Rx bandwidth filter is 325 kHz
-    {CC1101_DEVIATN, 0x34}, // Deviation 19.04 Khz, works well with TPMS
+    {CC1101_DEVIATN, 0x34}, // Deviation 19.04 Khz.
 
 
     /* Main Radio Control State Machine */
     /* Main Radio Control State Machine */
     {CC1101_MCSM0, 0x18}, // Autocalibrate on idle-to-rx/tx, PO_TIMEOUT is 64 cycles(149-155us)
     {CC1101_MCSM0, 0x18}, // Autocalibrate on idle-to-rx/tx, PO_TIMEOUT is 64 cycles(149-155us)