'transform: swap_xy:' configuration variable not allowed?

I am trying the following code:

display:
  - platform: qspi_dbi
#    model: JC4832W535
    model: axs15231
    data_rate: 40MHz
    id: my_display
    spi_id: display_qspi

    dimensions:
      height: 480
      width: 320
    transform:
      swap_xy: true
      mirror_x: true
      mirror_y: false
    cs_pin:
      number: 45
      ignore_strapping_warning: true
    auto_clear_enabled: false

and the compiler gives me:

Failed config

display.qspi_dbi: [source G32_JC3248W535_ESPHome_V120_HACS.YAML:198]
  platform: qspi_dbi
  model: axs15231
  data_rate: 40MHz
  id: my_display
  spi_id: display_qspi
  dimensions:
    height: 480
    width: 320
  transform:

    [swap_xy] is an invalid option for [transform]. Please check the indentation.
    swap_xy: True
    mirror_x: True
    mirror_y: False

Why is this so? I do not get it. There are examples in the ESPHome documentation where this exact code is shown.

Documentation says:

  • swap_xy (Optional, boolean): If true, exchange the x and y axes. Not available for some chips

If you have look at the qspi_dbi.h it has just 3 models:

enum Model {
  CUSTOM,
  RM690B0,
  RM67162,
};
1 Like

The qspi_dbi component has been replaced with mipi_spi but in any case the AXS15231 does not support axis swapping.

1 Like

Documentation for the ‘new’ MIPI SPI display driver says:

transform (Optional): If rotation is not sufficient, use this to transform the display. If this option is specified, then the dimensions option must also be provided. Options are:

swap_xy (Required, boolean): If true, exchange the x and y axes.
mirror_x (Required, boolean): If true, mirror the x axis.
mirror_y (Required, boolean): If true, mirror the y axis.

it does not mention that this option is not ‘available for some chips’.

Thank you very much!
It would be nice if the documentation would mentions somewhere that this option (and in general screen rotation at runtime!) is not supported for the AXS15231.

Jörg.

PS: I know how hard documentation is, so I am not complaining about it! Just a hint for a possible amendment …

It would be better to have the error message be more informative, since nobody reads docs anyway, or at least only as a last resort.

1 Like

So in fact the mipi_spi driver already does give a better error messge:

  model: jc3248w535
  transform:

    Axis swapping not supported by this model.
    swap_xy: True
    mirror_x: False
    mirror_y: False