Open hmaerki opened 8 months ago
I think I did something like this earlier as well. The problem is that caching it this way means that on_get_cb
also has no chance to update the vals
the way it's implemented now -- so the tests where it calls set_ireg
in the on_get_cb
might fail, since it expects the register values to update after it is called - but it would end up returning the old value instead of the new one.
I think I did something like this earlier as well. The problem is that caching it this way means that
on_get_cb
also has no chance to update thevals
the way it's implemented now -- so the tests where it callsset_ireg
in theon_get_cb
might fail, since it expects the register values to update after it is called - but it would end up returning the old value instead of the new one.
Hi @GimmickNG Thanks for your feedback. I could not follow your explanation as I do not know the library sufficiently. I was struggling due to lack of documentation or lack of examples (or I did just missed important parts).
Reading the documentation/examples, I failed to understand how to implement these concepts:
Eventually, the developer has to decide between these two concepts
It might be helpful to have the documentation and examples structured this way.
If you like, I could spend some hours in creating
Bug
on_get_cb
is defined, the second call toself._create_response()
overwrites the value returned byon_get_cb
.on_get_cb
was swallowed.Bugfix
self._create_response()
only once.