<commit_before>var socket;

function setLEDstatus (ledElement, status) {
  if(status) {
    ledElement.removeClass('led-green');
    ledElement.addClass('led-red');
  }
  else {
    ledElement.removeClass('led-green');
    ledElement.addClass('led-red');
  }
}

function setConnectedClass (cssClass) {
  $('#connectedLabel').removeClass('label-success');
  $('#connectedLabel').removeClass('label-warning');
  $('#connectedLabel').removeClass('label-danger');
  $('#connectedLabel').addClass( cssClass );

  if(cssClass == 'label-success')
    $('#connectedLabel').text('Connected');<commit_msg>Set AHRS status LED to green when the AHRS is connected.<commit_after>var socket;

function setLEDstatus (ledElement, status) {
  if(status) {
    ledElement.removeClass('led-red');
    ledElement.addClass('led-green');
  }
  else {
    ledElement.removeClass('led-green');
    ledElement.addClass('led-red');
  }
}

function setConnectedClass (cssClass) {
  $('#connectedLabel').removeClass('label-success');
  $('#connectedLabel').removeClass('label-warning');
  $('#connectedLabel').removeClass('label-danger');
  $('#connectedLabel').addClass( cssClass );

  if(cssClass == 'label-success')
    $('#connectedLabel').text('Connected');
{'fraction_non_alphanumeric': 0.18572587185725872, 'fraction_numerical': 0.0, 'mean_word_length': 5.494736842105263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1730556', 'n_tokens_mistral': 357, 'n_tokens_neox': 370, 'n_words': 55}