Skip to content

Commit

Permalink
[#143] PinsModule commands extend defs and use new constants
Browse files Browse the repository at this point in the history
  • Loading branch information
susanw1 committed Nov 21, 2023
1 parent f264676 commit 4aa35d2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class AtoDPinSetupCommand {
class AtoDPinSetupCommand: public AToDSetup_CommandDefs {
static constexpr char ParamPin__P = 'P';
static constexpr char ParamEnableNotifications__N = 'N';
static constexpr char ParamLowerLimit__L = 'L';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class DigitalPinReadCommand {
class DigitalPinReadCommand: public DigitalRead_CommandDefs {
static constexpr char ParamPin__P = 'P';

static constexpr char RespValue__V = 'V';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class DigitalPinWriteCommand {
class DigitalPinWriteCommand: public DigitalWrite_CommandDefs {
static constexpr char ParamPin__P = 'P';
static constexpr char ParamValue__V = 'V';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class DtoAPinSetupCommand {
class DtoAPinSetupCommand: public DToASetup_CommandDefs {
static constexpr char ParamPin__P = 'P';

static constexpr char RespBitCount__B = 'B';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class DtoAPinWriteCommand {
class DtoAPinWriteCommand: public AnalogWrite_CommandDefs {
static constexpr char ParamPin__P = 'P';
static constexpr char ParamValue__V = 'V';

public:

static void execute(ZscriptCommandContext<ZP> ctx) {
uint16_t pin;
if (!ctx.getField(ParamPin__P, &pin)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class PwmPinSetupCommand {
class PwmPinSetupCommand: public PwmSetup_CommandDefs {
static constexpr char ParamPin__P = 'P';

static constexpr char RespBitCount__B = 'B';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Zscript {
namespace pins_module {

template<class ZP>
class PwmPinWriteCommand {
class PwmPinWriteCommand: public PwmWrite_CommandDefs {
static constexpr char ParamPin__P = 'P';
static constexpr char ParamValue__V = 'V';

Expand Down

0 comments on commit 4aa35d2

Please sign in to comment.