Closed eZioPan closed 9 months ago
hi @Dirbaio , with all above PR merged, there is only one major peripheral waiting to clean: syscfg, more specific syscfg_f0 and syscfg_f3. There are a lot Not(Alternate)Remapped
/Remapped
, Standard
/FMP
enums, with a few NoSync
/Sync
, Disconnected
/Connected
, etc.
For Standard
/FMP
, we can merge them into one Standard
/FMP
enum, the field name should provide enough information.
For enums other than Standard
/FMP
and Not(Alternate)Remapped
/Remapped
, we can just replace them with false
/true
.
The most troublesome is Not(Alternate)Remapped
/Remapped
. In my opinion, the description of the enum value provides more information than value itself. So we can
Replace Not(Alternate)Remapped
/Remapped
with false
/true
, but this will ask user to read RM to find the meaning of values.
Or we should replace variant name with false
/true
, and manually copy each pair of values' desc to enum desc. This also require user reading RM, since #[doc]
render entire desc as one line. But we can waiting someday #[doc]
can render multiline doc.
Or we should replace variant name itself with more meaningful ones. This is most cumbersome choice, I don't know if it's worth.
And what makes these even worse, there are a few xxx_RMP
fields in syscfg_f3, they got meaningful variant name, make all these even inconsistent.
Would you provide some suggestions?
* eZioPan is mopping the floor and humming
the regex I used to filter disable(d)/no(t)/un enum is
after all these PRs, there shouldn't left any "xxx disable(d) xxx" -> 0, "xxx enable(d) xxx" -> 1 enum in PAC.
315
316
317
318
319
320
323
324
329
330
331
332
333
I will try remove
Also I will gradually write down all my changes into chiptool transform file, including previously manually changed ones. So that if any new yaml is added, we can reuse the cleanup transform yaml to do a quick cleanup.
337
338
339
340
341
344
345
346
347
348
349
351
355
358 syscfgs, a lot mess to cleanup