From 3dd98ff56aa045dff117438f865092cebd173af6 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 27 Aug 2021 15:30:07 -0400 Subject: [PATCH] Fix inverval logic, lel --- piker/ui/_position.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/piker/ui/_position.py b/piker/ui/_position.py index ff0f0508..3b8d19ba 100644 --- a/piker/ui/_position.py +++ b/piker/ui/_position.py @@ -179,12 +179,11 @@ class Allocator(BaseModel): # result in a mis-mapping of slots sizes in unit terms # (i.e. it would take *more* slots to exit at a profit and # *less* slots to exit at a loss). - slot_size = abs_startup_size / self.slots if ( - live_size < slot_size or - slot_size < live_size > 2*slot_size + abs_live_size < slot_size or + slot_size < abs_live_size < (2*slot_size) ): # the remaining pp is in between 0-2 slots # so dump the whole position in this last exit