{"action":"created","comment":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/comments/33870048","id":33870048,"diff_hunk":"@@ -45,77 +45,71 @@ class CustomizeGaugeBubble(CenteredBubble):\n \n NULL_LAP_TIME='--:--.---'\n \n-class Gauge(ButtonBehavior, AnchorLayout):\n-    _customizeGaugeBubble = None\n-    _valueView = None\n-    is_removable = BooleanProperty(True)\n-    is_channel_selectable = BooleanProperty(True)\n+class Gauge(AnchorLayout):\n+    rcid = None\n     settings = ObjectProperty(None)    \n     value_size = NumericProperty(0)\n     title_size = NumericProperty(0)\n-    channel = StringProperty(None, allownone=True)    \n     title = StringProperty('')\n-    value = NumericProperty(None, allownone=True)\n-    sensor_format = \"{:.0f}\"\n-    value_formatter = None\n-    precision = NumericProperty(DEFAULT_PRECISION)\n-    type = NumericProperty(DEFAULT_TYPE)\n-    warning = ObjectProperty(Range())\n-    alert = ObjectProperty(Range())\n-    min = NumericProperty(DEFAULT_MIN)\n-    max = NumericProperty(DEFAULT_MAX)\n+    data_bus = ObjectProperty(None)\n     title_color   = ObjectProperty(DEFAULT_NORMAL_COLOR)\n     normal_color  = ObjectProperty(DEFAULT_NORMAL_COLOR)\n-    pressed = ListProperty([0,0])\n-    data_bus = ObjectProperty(None)\n-    rcid = None\n-    _popup = None\n-\n-    _dismiss_customization_popup_trigger = None\n     \n     def __init__(self, **kwargs):\n         super(Gauge, self).__init__(**kwargs)\n         self.rcid = kwargs.get('rcid', self.rcid)\n         self.data_bus = kwargs.get('dataBus', self.data_bus)\n         self.settings = kwargs.get('settings', self.settings)\n-        self.channel = kwargs.get('targetchannel', self.channel)\n-        self._dismiss_customization_popup_trigger = Clock.create_trigger(self._dismiss_popup, POPUP_DISMISS_TIMEOUT_LONG)\n-        self.value_formatter = self.sensor_formatter        \n \n-    def _remove_customization_bubble(self, *args):\n+    @property\n+    def titleView(self):\n+        return self.ids.title\n+\n+    def on_title(self, instance, value):\n         try:\n-            if self._customizeGaugeBubble: \n-                self._customizeGaugeBubble.dismiss()\n-                self._customizeGaugeBubble = None\n-        except:\n+            if value is not None:\n+                view =  self.ids.title\n+                view.text = str(value)\n+        except: #the gauge may not have a title\n             pass\n-\n-    def _get_warn_prefs_key(self, channel):\n-        return '{}.warn'.format(self.channel)        \n+                \n+    def on_title_color(self, instance, value):\n+        self.titleView.color = value\n     \n-    def _get_alert_prefs_key(self, channel):\n-        return '{}.alert'.format(self.channel)\n-            \n-    def _update_channel_ranges(self):\n-        channel = self.channel\n-        user_prefs = self.settings.userPrefs\n-        self.warning = user_prefs.get_range_alert(self._get_warn_prefs_key(channel), self.warning)\n-        self.alert   = user_prefs.get_range_alert(self._get_alert_prefs_key(channel), self.alert)\n-\n-    def removeChannel(self):\n-        self._remove_customization_bubble()        \n-        channel = self.channel\n-        if channel:\n-            self.data_bus.removeChannelListener(channel, self.setValue)\n-        self.channel = None        \n-\n-    def customizeGauge(self, *args):\n-        self._remove_customization_bubble()\n-        self.showChannelConfigDialog()\n+    def on_title_size(self, instance, value):\n+        view = self.titleView\n+        if view:\n+            view.font_size = value\n+    \n+    def update_title(self, channel_name, channel_meta):\n+        try:\n+            title = ''\n+            if channel_name is not None and channel_meta is not None:\n+                title = channel_meta.name\n+                if channel_meta.units and len(channel_meta.units):\n+                    title += '\\n({})'.format(channel_meta.units)\n+            self.title = title\n+        except Exception as e:\n+            Logger.error('Gauge: Failed to update gauge title & units ' + str(e) + ' ' + str(title))\n+                 \n+    def on_channel_meta(self, channel_metas):\n+        pass\n+    \n+class SingleChannelGauge(Gauge):\n+    _valueView = None    \n+    channel = StringProperty(None, allownone=True)    \n+    value = NumericProperty(None, allownone=True)\n+    sensor_format = \"{:.0f}\"\n+    value_formatter = None\n+    precision = NumericProperty(DEFAULT_PRECISION)\n+    type = NumericProperty(DEFAULT_TYPE)\n+    halign = StringProperty(None)\n+    valign = StringProperty(None)\n \n-    def selectChannel(self, *args):\n-        self._remove_customization_bubble()\n-        self.showChannelSelectDialog()        \n+    def __init__(self, **kwargs):\n+        super(SingleChannelGauge, self).__init__(**kwargs)\n+        self.channel = kwargs.get('targetchannel', self.channel)","path":"autosportlabs/racecapture/views/dashboard/widgets/gauge.py","position":121,"original_position":121,"commit_id":"69c5a4a0ff3abdda3e97cad669b9b167600dbe97","original_commit_id":"69c5a4a0ff3abdda3e97cad669b9b167600dbe97","user":{"login":"ryandoherty","id":45628,"avatar_url":"https://avatars.githubusercontent.com/u/45628?v=3","gravatar_id":"","url":"https://api.github.com/users/ryandoherty","html_url":"https://github.com/ryandoherty","followers_url":"https://api.github.com/users/ryandoherty/followers","following_url":"https://api.github.com/users/ryandoherty/following{/other_user}","gists_url":"https://api.github.com/users/ryandoherty/gists{/gist_id}","starred_url":"https://api.github.com/users/ryandoherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryandoherty/subscriptions","organizations_url":"https://api.github.com/users/ryandoherty/orgs","repos_url":"https://api.github.com/users/ryandoherty/repos","events_url":"https://api.github.com/users/ryandoherty/events{/privacy}","received_events_url":"https://api.github.com/users/ryandoherty/received_events","type":"User","site_admin":false},"body":"I'm still in favor of required arguments not be inside kwargs. Allows for IDEs and code tools to better inspect the code and allows other developers to understand what's required for a function and what's optional (kwargs are usually optional).\r\n\r\nRelated: https://github.com/autosportlabs/RaceCapture_App/pull/50#discussion_r30844733","created_at":"2015-07-03T15:13:25Z","updated_at":"2015-07-03T15:13:25Z","html_url":"https://github.com/autosportlabs/RaceCapture_App/pull/69#discussion_r33870048","pull_request_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/comments/33870048"},"html":{"href":"https://github.com/autosportlabs/RaceCapture_App/pull/69#discussion_r33870048"},"pull_request":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69","id":39143526,"html_url":"https://github.com/autosportlabs/RaceCapture_App/pull/69","diff_url":"https://github.com/autosportlabs/RaceCapture_App/pull/69.diff","patch_url":"https://github.com/autosportlabs/RaceCapture_App/pull/69.patch","issue_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/69","number":69,"state":"open","locked":false,"title":"V1.3.6 dashboard updates","user":{"login":"brentpicasso","id":3267533,"avatar_url":"https://avatars.githubusercontent.com/u/3267533?v=3","gravatar_id":"","url":"https://api.github.com/users/brentpicasso","html_url":"https://github.com/brentpicasso","followers_url":"https://api.github.com/users/brentpicasso/followers","following_url":"https://api.github.com/users/brentpicasso/following{/other_user}","gists_url":"https://api.github.com/users/brentpicasso/gists{/gist_id}","starred_url":"https://api.github.com/users/brentpicasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentpicasso/subscriptions","organizations_url":"https://api.github.com/users/brentpicasso/orgs","repos_url":"https://api.github.com/users/brentpicasso/repos","events_url":"https://api.github.com/users/brentpicasso/events{/privacy}","received_events_url":"https://api.github.com/users/brentpicasso/received_events","type":"User","site_admin":false},"body":"Video: https://www.youtube.com/watch?v=Uj9firfhKuQ\r\n\r\n* LapTime gauges have a new behavior with the following display logic:\r\n\r\n1) Before completing 1 lap, only display elapsed time since beginning of start/finish to provide a stopwatch effect\r\n2) Upon completing a lap, flash the freshly completed lap time for 5 seconds.\r\n3) Then show predicted time, if present in data stream. if not present, show last lap time statically\r\n4) rinse / repeat on subsequent laps\r\n\r\nLapTime widget behavior is consistent anywhere this LapTime widget is added in the dashboard views.\r\n\r\n* Refactored gauge class into CustomizableGauge and SingleChannelGauge\r\n\r\n* De-cluttered Tachometer view","created_at":"2015-07-03T03:28:06Z","updated_at":"2015-07-03T15:13:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8e089b28a2f7cd02cf1df1ba38949ce35bca0db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69/commits","review_comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69/comments","review_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/69/comments","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/statuses/69c5a4a0ff3abdda3e97cad669b9b167600dbe97","head":{"label":"autosportlabs:v1.3.6_dashboard_updates","ref":"v1.3.6_dashboard_updates","sha":"69c5a4a0ff3abdda3e97cad669b9b167600dbe97","user":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17649551,"name":"RaceCapture_App","full_name":"autosportlabs/RaceCapture_App","owner":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autosportlabs/RaceCapture_App","description":"Next Generation version of the RaceCapture App","fork":false,"url":"https://api.github.com/repos/autosportlabs/RaceCapture_App","forks_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/forks","keys_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/teams","hooks_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/hooks","issue_events_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/events{/number}","events_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/events","assignees_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/assignees{/user}","branches_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/branches{/branch}","tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/tags","blobs_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/statuses/{sha}","languages_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/languages","stargazers_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/stargazers","contributors_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/contributors","subscribers_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/subscribers","subscription_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/subscription","commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/contents/{+path}","compare_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/merges","archive_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/downloads","issues_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues{/number}","pulls_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls{/number}","milestones_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/milestones{/number}","notifications_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/labels{/name}","releases_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/releases{/id}","created_at":"2014-03-11T23:58:31Z","updated_at":"2015-06-24T01:00:53Z","pushed_at":"2015-07-03T03:49:08Z","git_url":"git://github.com/autosportlabs/RaceCapture_App.git","ssh_url":"git@github.com:autosportlabs/RaceCapture_App.git","clone_url":"https://github.com/autosportlabs/RaceCapture_App.git","svn_url":"https://github.com/autosportlabs/RaceCapture_App","homepage":"","size":25371,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":14,"default_branch":"master"}},"base":{"label":"autosportlabs:master","ref":"master","sha":"ab4da143136e7b4a1e628a8d540d996bfa012ac2","user":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17649551,"name":"RaceCapture_App","full_name":"autosportlabs/RaceCapture_App","owner":{"login":"autosportlabs","id":1274125,"avatar_url":"https://avatars.githubusercontent.com/u/1274125?v=3","gravatar_id":"","url":"https://api.github.com/users/autosportlabs","html_url":"https://github.com/autosportlabs","followers_url":"https://api.github.com/users/autosportlabs/followers","following_url":"https://api.github.com/users/autosportlabs/following{/other_user}","gists_url":"https://api.github.com/users/autosportlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/autosportlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosportlabs/subscriptions","organizations_url":"https://api.github.com/users/autosportlabs/orgs","repos_url":"https://api.github.com/users/autosportlabs/repos","events_url":"https://api.github.com/users/autosportlabs/events{/privacy}","received_events_url":"https://api.github.com/users/autosportlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autosportlabs/RaceCapture_App","description":"Next Generation version of the RaceCapture App","fork":false,"url":"https://api.github.com/repos/autosportlabs/RaceCapture_App","forks_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/forks","keys_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/teams","hooks_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/hooks","issue_events_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/events{/number}","events_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/events","assignees_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/assignees{/user}","branches_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/branches{/branch}","tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/tags","blobs_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/refs{/sha}","trees_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/statuses/{sha}","languages_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/languages","stargazers_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/stargazers","contributors_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/contributors","subscribers_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/subscribers","subscription_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/subscription","commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/commits{/sha}","git_commits_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/git/commits{/sha}","comments_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/comments{/number}","issue_comment_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/comments{/number}","contents_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/contents/{+path}","compare_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/merges","archive_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/downloads","issues_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues{/number}","pulls_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls{/number}","milestones_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/milestones{/number}","notifications_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/labels{/name}","releases_url":"https://api.github.com/repos/autosportlabs/RaceCapture_App/releases{/id}","created_at":"2014-03-11T23:58:31Z","updated_at":"2015-06-24T01:00:53Z","pushed_at":"2015-07-03T03:49:08Z","git_url":"git://github.com/autosportlabs/RaceCapture_App.git","ssh_url":"git@github.com:autosportlabs/RaceCapture_App.git","clone_url":"https://github.com/autosportlabs/RaceCapture_App.git","svn_url":"https://github.com/autosportlabs/RaceCapture_App","homepage":"","size":25371,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69"},"html":{"href":"https://github.com/autosportlabs/RaceCapture_App/pull/69"},"issue":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/69"},"comments":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/autosportlabs/RaceCapture_App/statuses/69c5a4a0ff3abdda3e97cad669b9b167600dbe97"}}}}