plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[husky2]: bug fix

Open gruberth opened this issue 1 year ago • 2 comments

Fixed a endless loop wich was caused by a wrong/outdated check if the update_item() call came from the plugin itself.

gruberth avatar Apr 09 '24 20:04 gruberth

I don't get, which problem is fixed by this PR.

  • get_fullname() is only needed in multiinstance capable plugins to distinguish the instances of the plugin. It adds the instance name to the plugin nam. This plugin is not mulitinstance capable.

  • the caller parameter is a string. The comparision caller != self.get_shortname() (or caller != self.get_fullname() ). Why are you looking for a substring?

msinn avatar May 05 '24 09:05 msinn

Nach dem erfolgreichen Senden von Befehlen werden die entsprechedenen (Bool-) Items vom Plugin selbst wieder auf False zurückgesetzt (caller ist dabei auf fullname gesetzt). Da aber der caller in der update_item() manchmal als Eval:husky2 anstatt nur husky2 ankommt, suche ich einfach nach dem Substring. Wenn ich das nicht mache, habe ich ab und zu eine Endlosschleife in der update_tiem() nachdem ich einen Befehl sende und sh verabschiedet sich.

Ob ich fullname oder shortname verwende ist hier logisch egal, aber ist auch nicht schlimm wenns der fullname ist.

PS: dieser Fehelr tritt nur im develop branch auf.

gruberth avatar May 05 '24 13:05 gruberth