mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-23 22:28:28 +02:00
Grove amend name (#5093)
This commit is contained in:
+17
-17
@@ -14,23 +14,23 @@ DEPENDENCIES = ["i2c"]
|
||||
|
||||
CODEOWNERS = ["@max246"]
|
||||
|
||||
grove_i2c_motor_ns = cg.esphome_ns.namespace("grove_i2c_motor")
|
||||
GROVE_TB6612FNG = grove_i2c_motor_ns.class_(
|
||||
grove_tb6612fng_ns = cg.esphome_ns.namespace("grove_tb6612fng")
|
||||
GROVE_TB6612FNG = grove_tb6612fng_ns.class_(
|
||||
"GroveMotorDriveTB6612FNG", cg.Component, i2c.I2CDevice
|
||||
)
|
||||
GROVETB6612FNGMotorRunAction = grove_i2c_motor_ns.class_(
|
||||
GROVETB6612FNGMotorRunAction = grove_tb6612fng_ns.class_(
|
||||
"GROVETB6612FNGMotorRunAction", automation.Action
|
||||
)
|
||||
GROVETB6612FNGMotorBrakeAction = grove_i2c_motor_ns.class_(
|
||||
GROVETB6612FNGMotorBrakeAction = grove_tb6612fng_ns.class_(
|
||||
"GROVETB6612FNGMotorBrakeAction", automation.Action
|
||||
)
|
||||
GROVETB6612FNGMotorStopAction = grove_i2c_motor_ns.class_(
|
||||
GROVETB6612FNGMotorStopAction = grove_tb6612fng_ns.class_(
|
||||
"GROVETB6612FNGMotorStopAction", automation.Action
|
||||
)
|
||||
GROVETB6612FNGMotorStandbyAction = grove_i2c_motor_ns.class_(
|
||||
GROVETB6612FNGMotorStandbyAction = grove_tb6612fng_ns.class_(
|
||||
"GROVETB6612FNGMotorStandbyAction", automation.Action
|
||||
)
|
||||
GROVETB6612FNGMotorNoStandbyAction = grove_i2c_motor_ns.class_(
|
||||
GROVETB6612FNGMotorNoStandbyAction = grove_tb6612fng_ns.class_(
|
||||
"GROVETB6612FNGMotorNoStandbyAction", automation.Action
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ async def to_code(config):
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"grove_i2c_motor.run",
|
||||
"grove_tb6612fng.run",
|
||||
GROVETB6612FNGMotorRunAction,
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -68,7 +68,7 @@ async def to_code(config):
|
||||
}
|
||||
),
|
||||
)
|
||||
async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
|
||||
async def grove_tb6612fng_run_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
@@ -83,7 +83,7 @@ async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"grove_i2c_motor.break",
|
||||
"grove_tb6612fng.break",
|
||||
GROVETB6612FNGMotorBrakeAction,
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -92,7 +92,7 @@ async def grove_i2c_motor_run_to_code(config, action_id, template_arg, args):
|
||||
}
|
||||
),
|
||||
)
|
||||
async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
|
||||
async def grove_tb6612fng_break_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
@@ -102,7 +102,7 @@ async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"grove_i2c_motor.stop",
|
||||
"grove_tb6612fng.stop",
|
||||
GROVETB6612FNGMotorStopAction,
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -111,7 +111,7 @@ async def grove_i2c_motor_break_to_code(config, action_id, template_arg, args):
|
||||
}
|
||||
),
|
||||
)
|
||||
async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
|
||||
async def grove_tb6612fng_stop_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
@@ -121,7 +121,7 @@ async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"grove_i2c_motor.standby",
|
||||
"grove_tb6612fng.standby",
|
||||
GROVETB6612FNGMotorStandbyAction,
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -129,7 +129,7 @@ async def grove_i2c_motor_stop_to_code(config, action_id, template_arg, args):
|
||||
}
|
||||
),
|
||||
)
|
||||
async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args):
|
||||
async def grove_tb6612fng_standby_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
@@ -137,7 +137,7 @@ async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args)
|
||||
|
||||
|
||||
@automation.register_action(
|
||||
"grove_i2c_motor.no_standby",
|
||||
"grove_tb6612fng.no_standby",
|
||||
GROVETB6612FNGMotorNoStandbyAction,
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -145,7 +145,7 @@ async def grove_i2c_motor_standby_to_code(config, action_id, template_arg, args)
|
||||
}
|
||||
),
|
||||
)
|
||||
async def grove_i2c_motor_no_standby_to_code(config, action_id, template_arg, args):
|
||||
async def grove_tb6612fng_no_standby_to_code(config, action_id, template_arg, args):
|
||||
var = cg.new_Pvariable(action_id, template_arg)
|
||||
await cg.register_parented(var, config[CONF_ID])
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
#include "grove_i2c_motor.h"
|
||||
#include "grove_tb6612fng.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace grove_i2c_motor {
|
||||
namespace grove_tb6612fng {
|
||||
|
||||
static const char *const TAG = "GroveMotorDriveTB6612FNG";
|
||||
|
||||
@@ -167,5 +167,5 @@ void GroveMotorDriveTB6612FNG::stepper_keep_run(StepperModeTypeT mode, uint16_t
|
||||
return;
|
||||
}
|
||||
}
|
||||
} // namespace grove_i2c_motor
|
||||
} // namespace grove_tb6612fng
|
||||
} // namespace esphome
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
namespace esphome {
|
||||
namespace grove_i2c_motor {
|
||||
namespace grove_tb6612fng {
|
||||
|
||||
enum MotorChannelTypeT {
|
||||
MOTOR_CHA = 0,
|
||||
@@ -204,5 +204,5 @@ class GROVETB6612FNGMotorNoStandbyAction : public Action<Ts...>, public Parented
|
||||
void play(Ts... x) override { this->parent_->not_standby(); }
|
||||
};
|
||||
|
||||
} // namespace grove_i2c_motor
|
||||
} // namespace grove_tb6612fng
|
||||
} // namespace esphome
|
||||
Reference in New Issue
Block a user