mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[ft63x6] Get correct dimensions from display (#8417)
This commit is contained in:
		| @@ -42,10 +42,10 @@ void FT63X6Touchscreen::setup() { | |||||||
|  |  | ||||||
|   // Get touch resolution |   // Get touch resolution | ||||||
|   if (this->x_raw_max_ == this->x_raw_min_) { |   if (this->x_raw_max_ == this->x_raw_min_) { | ||||||
|     this->x_raw_max_ = 320; |     this->x_raw_max_ = this->display_->get_native_width(); | ||||||
|   } |   } | ||||||
|   if (this->y_raw_max_ == this->y_raw_min_) { |   if (this->y_raw_max_ == this->y_raw_min_) { | ||||||
|     this->y_raw_max_ = 480; |     this->y_raw_max_ = this->display_->get_native_height(); | ||||||
|   } |   } | ||||||
|   uint8_t chip_id = this->read_byte_(FT63X6_ADDR_CHIP_ID); |   uint8_t chip_id = this->read_byte_(FT63X6_ADDR_CHIP_ID); | ||||||
|   if (chip_id != 0) { |   if (chip_id != 0) { | ||||||
| @@ -71,6 +71,8 @@ void FT63X6Touchscreen::dump_config() { | |||||||
|   LOG_I2C_DEVICE(this); |   LOG_I2C_DEVICE(this); | ||||||
|   LOG_PIN("  Interrupt Pin: ", this->interrupt_pin_); |   LOG_PIN("  Interrupt Pin: ", this->interrupt_pin_); | ||||||
|   LOG_PIN("  Reset Pin: ", this->reset_pin_); |   LOG_PIN("  Reset Pin: ", this->reset_pin_); | ||||||
|  |   ESP_LOGCONFIG(TAG, "  X Calibration: [%d, %d]", this->x_raw_min_, this->x_raw_max_); | ||||||
|  |   ESP_LOGCONFIG(TAG, "  Y Calibration: [%d, %d]", this->y_raw_min_, this->y_raw_max_); | ||||||
|   LOG_UPDATE_INTERVAL(this); |   LOG_UPDATE_INTERVAL(this); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user