mirror of
https://github.com/esphome/esphome.git
synced 2025-10-25 13:13:48 +01:00
Merge branch 'dev' into jesserockz-2025-457
This commit is contained in:
@@ -35,7 +35,7 @@ template<typename... Ts> class UserServiceBase : public UserServiceDescriptor {
|
||||
msg.set_name(StringRef(this->name_));
|
||||
msg.key = this->key_;
|
||||
std::array<enums::ServiceArgType, sizeof...(Ts)> arg_types = {to_service_arg_type<Ts>()...};
|
||||
for (int i = 0; i < sizeof...(Ts); i++) {
|
||||
for (size_t i = 0; i < sizeof...(Ts); i++) {
|
||||
msg.args.emplace_back();
|
||||
auto &arg = msg.args.back();
|
||||
arg.type = arg_types[i];
|
||||
|
||||
@@ -20,6 +20,23 @@ bool MCP2515::setup_internal() {
|
||||
return false;
|
||||
if (this->set_bitrate_(this->bit_rate_, this->mcp_clock_) != canbus::ERROR_OK)
|
||||
return false;
|
||||
|
||||
// setup hardware filter RXF0 accepting all standard CAN IDs
|
||||
if (this->set_filter_(RXF::RXF0, false, 0) != canbus::ERROR_OK) {
|
||||
return false;
|
||||
}
|
||||
if (this->set_filter_mask_(MASK::MASK0, false, 0) != canbus::ERROR_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// setup hardware filter RXF1 accepting all extended CAN IDs
|
||||
if (this->set_filter_(RXF::RXF1, true, 0) != canbus::ERROR_OK) {
|
||||
return false;
|
||||
}
|
||||
if (this->set_filter_mask_(MASK::MASK1, true, 0) != canbus::ERROR_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->set_mode_(this->mcp_mode_) != canbus::ERROR_OK)
|
||||
return false;
|
||||
uint8_t err_flags = this->get_error_flags_();
|
||||
|
||||
@@ -2274,11 +2274,11 @@ void GDEW0154M09::clear_() {
|
||||
uint32_t pixsize = this->get_buffer_length_();
|
||||
for (uint8_t j = 0; j < 2; j++) {
|
||||
this->command(CMD_DTM1_DATA_START_TRANS);
|
||||
for (int count = 0; count < pixsize; count++) {
|
||||
for (uint32_t count = 0; count < pixsize; count++) {
|
||||
this->data(0x00);
|
||||
}
|
||||
this->command(CMD_DTM2_DATA_START_TRANS2);
|
||||
for (int count = 0; count < pixsize; count++) {
|
||||
for (uint32_t count = 0; count < pixsize; count++) {
|
||||
this->data(0xff);
|
||||
}
|
||||
this->command(CMD_DISPLAY_REFRESH);
|
||||
@@ -2291,11 +2291,11 @@ void HOT GDEW0154M09::display() {
|
||||
this->init_internal_();
|
||||
// "Mode 0 display" for now
|
||||
this->command(CMD_DTM1_DATA_START_TRANS);
|
||||
for (int i = 0; i < this->get_buffer_length_(); i++) {
|
||||
for (uint32_t i = 0; i < this->get_buffer_length_(); i++) {
|
||||
this->data(0xff);
|
||||
}
|
||||
this->command(CMD_DTM2_DATA_START_TRANS2); // write 'new' data to SRAM
|
||||
for (int i = 0; i < this->get_buffer_length_(); i++) {
|
||||
for (uint32_t i = 0; i < this->get_buffer_length_(); i++) {
|
||||
this->data(this->buffer_[i]);
|
||||
}
|
||||
this->command(CMD_DISPLAY_REFRESH);
|
||||
|
||||
Reference in New Issue
Block a user