• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. BobDay
    3. Best

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 26
    • Posts 108
    • Best 8
    • Controversial 0
    • Groups 0

    Best posts made by BobDay

    • RE: ma-point-value: number formatting

      @mattfox said in ma-point-value: number formatting:

      point.value.toFixed(1)

      you can also use a built-in Angular filter -
      {{point.value | number(decimal places)}}

      ...even when doing things you can't do more than basics - like
      {{point.value*256 | number(1)}}

      edit. Jared Wiltshire - examples given here are incorrect, see post by @Puckfist below.

      posted in How-To
      B
      BobDay
    • RE: 2 watchlists on same page?

      Thanks as well, @CraigWeb

      posted in Dashboard Designer & Custom AngularJS Pages
      B
      BobDay
    • RE: no text in ace editor [closed]

      sure. thanks...

      0_1577390354779_Screen Shot 2019-12-26 at 11.56.17 AM.png

      posted in Mango feedback
      B
      BobDay
    • RE: Trouble with Mango kiosk display

      Thanks, @Jared-Wiltshire. The problem seems to be as follows:

      If started from root (which I don't want to do, of course) with the --no-sandbox switch, everything works fine.

      if started from regular user, it appears there is an X server bug -

      Fatal server error:
      (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
      

      Dealt with permissions, but then another similar permissions error...

      After fixing permissions on the tty files, it works now without having to run as root.

      Any experience with minimal Firefox kiosk use? Couldn't find much of value out there. Thanks again.

      edit: for anyone who comes across this, and keeping in mind that I have only vague knowledge of how xserver works, the environment needs access to a number of /dev/tty files. I had to change permissions (a+rw) in tty files in 3 successive attempts, until successful. In my case it was tty0, tty7, tty2. This is specific at least to xorg compiled with raspberian stretch lite as of 12/20/2018.

      posted in Mango Automation general Discussion
      B
      BobDay
    • RE: amCharts - maTankLevel center chart column in div

      @jared-wiltshire said in amCharts - maTankLevel center chart column in div:

      marginRight: -74

      Aha! Thank you Jared! I was barking up another tree... sorry for all the code - TMI

      posted in User help
      B
      BobDay
    • RE: Help getting ma-watch-list-get points into a controller/service

      Thanks for all the help.

      posted in User help
      B
      BobDay
    • RE: Advice on moving components / controllers / services out of userModule

      so WE did! same problem tho.

      lets take this back to chat...

      posted in User help
      B
      BobDay
    • RE: Advice on moving components / controllers / services out of userModule

      ok, @MattFox... I feel like a post (as in dumb as one). Can you refresh me again as to how to now break out (and where to declare) the component's controller in its own file?

      userModule.js

      define(['angular', 'require','./push/pushLamp.js'],
        function (angular, require, pushLamp) {
          var userModule = angular.module('userModule', ['maUiApp']);
      
          userModule.filter('unsafe', ['$sce', function($sce) {
             return $sce.trustAsHtml;
          }]);
      
          try
          {
            userModule.component('pushLamp',pushLamp);
          }
          catch(e)
          {
            console.log('error: ', e);
          }
          return userModule.js;
      
      });
      

      pushLamp.js:

      define(['angular', 'require'], function (angular, require) {
      
        pushCtrl.$inject = ['$scope','$timeout'];
      
        function pushCtrl($scope,$timeout) {
      
          const $ctrl = this;
          $ctrl.$onChanges = function (changes) {
            if (changes.points && Array.isArray($ctrl.points)) {
      
              $ctrl.point = $ctrl.points.find(p => p.xid === 'DP_ind_' + $ctrl.target);
              $ctrl.switchPoint = $ctrl.points.find(p => p.xid === 'DP_sw_' + $ctrl.target);
      
              $ctrl.ptCSS = { // point css values for color and blink; ex, ng-class=""
                get color(){
                  if ($ctrl.point.color < 10) {
                    return 0;
                  }
                  return Math.floor($ctrl.point.value / 10)},
                get blink(){return 'blink' + $ctrl.point.value % 10},
                get colStyle(){return 'color'+this.color}
              };
      
              $timeout(function() {
                console.log('color:', $ctrl.ptCSS.colStyle, 'blink:', $ctrl.ptCSS.blink );
              },1000);
            }
          };
      
          $ctrl.pushed = function() {
            console.log($ctrl.switchPoint.value);
              if ($ctrl.switchPoint) {
                  $ctrl.switchPoint.toggleValue();
                console.log('switch ' + $ctrl.target + ' was switched.' );
             }
          };
        }
      
      return {
            templateUrl: '/modules/mangoUI/web/dev/push/push.html',
            bindings: {
              points: '<',
              target: '@'
            },
            controller: pushCtrl
          };
      
      });
      posted in User help
      B
      BobDay