From 68666f9c5b4b120cbd65b922d6cdbc2f7be9ebab Mon Sep 17 00:00:00 2001 From: Dryw Wade Date: Thu, 11 Jan 2024 14:36:09 -0700 Subject: [PATCH] Bring up parent constructors for child classes Discussed in #17, couldn't set pins with constructors of child classes --- src/sfe_lara_r6.h | 14 ++++++++++++++ src/sfe_sara_r5.h | 13 +++++++++++++ src/sfe_ublox_cellular_voice.h | 2 ++ 3 files changed, 29 insertions(+) diff --git a/src/sfe_lara_r6.h b/src/sfe_lara_r6.h index e421ae3..7111190 100644 --- a/src/sfe_lara_r6.h +++ b/src/sfe_lara_r6.h @@ -7,30 +7,44 @@ // Base LARA-R6 class class SparkFun_ublox_LARA_R6 : public SparkFun_ublox_Cellular { + // Bring up parent constructors + using SparkFun_ublox_Cellular::SparkFun_ublox_Cellular; }; class SparkFun_ublox_LARA_R6001 : public SparkFun_ublox_LARA_R6, public SparkFun_ublox_Cellular_Voice_Base { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; class SparkFun_ublox_LARA_R6001D : public SparkFun_ublox_LARA_R6 { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; class SparkFun_ublox_LARA_R6401 : public SparkFun_ublox_LARA_R6, public SparkFun_ublox_Cellular_Voice_Base { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; class SparkFun_ublox_LARA_R6401D : public SparkFun_ublox_LARA_R6 { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; class SparkFun_ublox_LARA_R6801_00B : public SparkFun_ublox_LARA_R6, public SparkFun_ublox_Cellular_Voice_Base { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; class SparkFun_ublox_LARA_R6801D : public SparkFun_ublox_LARA_R6 { + // Bring up parent constructors + using SparkFun_ublox_LARA_R6::SparkFun_ublox_LARA_R6; }; #endif \ No newline at end of file diff --git a/src/sfe_sara_r5.h b/src/sfe_sara_r5.h index f61a67f..7e12d46 100644 --- a/src/sfe_sara_r5.h +++ b/src/sfe_sara_r5.h @@ -18,6 +18,9 @@ class SparkFun_ublox_SARA_R5 : public SparkFun_ublox_Cellular public: SparkFun_ublox_SARA_R5(); + // Bring up parent constructors + using SparkFun_ublox_Cellular::SparkFun_ublox_Cellular; + UBX_CELL_error_t setUtimeMode( UBX_CELL_utime_mode_t mode = UBX_CELL_UTIME_MODE_PPS, UBX_CELL_utime_sensor_t sensor = UBX_CELL_UTIME_SENSOR_GNSS_LTE); // Time mode, source etc. (+UTIME) @@ -52,22 +55,32 @@ class SparkFun_ublox_SARA_R5 : public SparkFun_ublox_Cellular class SparkFun_ublox_SARA_R500S : public SparkFun_ublox_SARA_R5 { + // Bring up parent constructors + using SparkFun_ublox_SARA_R5::SparkFun_ublox_SARA_R5; }; class SparkFun_ublox_SARA_R500S_01B : public SparkFun_ublox_SARA_R5 { + // Bring up parent constructors + using SparkFun_ublox_SARA_R5::SparkFun_ublox_SARA_R5; }; class SparkFun_ublox_SARA_R500S_61B : public SparkFun_ublox_SARA_R5 { + // Bring up parent constructors + using SparkFun_ublox_SARA_R5::SparkFun_ublox_SARA_R5; }; class SparkFun_ublox_SARA_R510M8S_61B : public SparkFun_ublox_SARA_R5 { + // Bring up parent constructors + using SparkFun_ublox_SARA_R5::SparkFun_ublox_SARA_R5; }; class SparkFun_ublox_SARA_R510S : public SparkFun_ublox_SARA_R5 { + // Bring up parent constructors + using SparkFun_ublox_SARA_R5::SparkFun_ublox_SARA_R5; }; #endif \ No newline at end of file diff --git a/src/sfe_ublox_cellular_voice.h b/src/sfe_ublox_cellular_voice.h index c824d02..21f066d 100644 --- a/src/sfe_ublox_cellular_voice.h +++ b/src/sfe_ublox_cellular_voice.h @@ -161,6 +161,8 @@ template class SparkFun_ublox_Cellular_Voice_Base class SparkFun_ublox_Cellular_Voice : public SparkFun_ublox_Cellular, public SparkFun_ublox_Cellular_Voice_Base { + // Bring up parent constructors + using SparkFun_ublox_Cellular::SparkFun_ublox_Cellular; }; #endif \ No newline at end of file