Changeset 30 for trunk


Ignore:
Timestamp:
04/10/10 20:30:59 (14 years ago)
Author:
pinwc4
Message:

Added beginning logic to decode data sent from car

Location:
trunk/desktop
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/ICSSerialPort.rbbas

    r28 r30  
    22Protected Class ICSSerialPort 
    33Inherits serial 
    4         #tag Method, Flags = &h0 
    5                 Sub resetCar() 
    6                   //This sends the command to reset the car back to a default configuration 
    7                   //Defaults are different for each car type 
    8                   setDefaultValues 
    9                    
    10                   //Send the default values to the car 
    11                   writeCar 
    12                 End Sub 
    13         #tag EndMethod 
    14  
    15         #tag Method, Flags = &h0 
    16                 Sub setDefaultValues() 
    17                   //Set the defaults for the bytes sent to a car 
    18                    
    19                   select case carType 
    20                      
    21                   case "MR-03" 
    22                     byte01 = chrb(&hD5) 
    23                     byte02 = chrb(&h5A) 
    24                     byte03 = chrb(&h64) 
    25                     byte04 = chrb(&hFF) 
    26                     byte05 = chrb(&h02) 
    27                     byte06 = chrb(&h02) 
    28                     byte07 = chrb(&h01) 
    29                     byte08 = chrb(&hFF) 
    30                     byte09 = chrb(&hBC) 
    31                     byte10 = chrb(&h44) 
    32                     byte11 = chrb(&h88) 
    33                     byte12 = chrb(&h78) 
    34                     byte13 = chrb(&hFF) 
    35                     byte14 = chrb(&h2C) 
    36                     byte15 = chrb(&h05) 
    37                     byte16 = chrb(&h5A) 
    38                     byte17 = chrb(&h3C) 
    39                     byte18 = chrb(&h87) 
    40                      
    41                   case "dNaNo" 
    42                     byte01 = chrb(&hD5) 
    43                     byte02 = chrb(&h5A) 
    44                     byte03 = chrb(&hFF) 
    45                     byte04 = chrb(&hFF) 
    46                     byte05 = chrb(&h0A) 
    47                     byte06 = chrb(&h03) 
    48                     byte07 = chrb(&h01) 
    49                     byte08 = chrb(&h40) 
    50                     byte09 = chrb(&hBC) 
    51                     byte10 = chrb(&h44) 
    52                     byte11 = chrb(&h88) 
    53                     byte12 = chrb(&h78) 
    54                     byte13 = chrb(&h03) 
    55                     byte14 = chrb(&hFF) 
    56                     byte15 = chrb(&hFF) 
    57                     byte16 = chrb(&h80) 
    58                     byte17 = chrb(&h80) 
    59                     byte18 = chrb(&hA7) 
    60                      
    61                   case "ASF" 
    62                     byte01 = chrb(&hD5) 
    63                     byte02 = chrb(&h5A) 
    64                     byte03 = chrb(&hFF) 
    65                     byte04 = chrb(&hFF) 
    66                     byte05 = chrb(&h0A) 
    67                     byte06 = chrb(&h03) 
    68                     byte07 = chrb(&h01) 
    69                     byte08 = chrb(&h78) 
    70                     byte09 = chrb(&hBC) 
    71                     byte10 = chrb(&h44) 
    72                     byte11 = chrb(&h88) 
    73                     byte12 = chrb(&h78) 
    74                     byte13 = chrb(&h03) 
    75                     byte14 = chrb(&hFF) 
    76                     byte15 = chrb(&hFF) 
    77                     byte16 = chrb(&hFF) 
    78                     byte17 = chrb(&hFF) 
    79                     byte18 = chrb(&hDD) 
     4        #tag Event 
     5                Sub DataAvailable() 
     6                  //Add to the buffer first 
     7                   
     8                  buffer = buffer + me.ReadAll 
     9                   
     10                  //Figure out if we need to do anything 
     11                   
     12                  select case mode 
     13                     
     14                  case "read" 
     15                    dim flagstart as integer 
     16                    dim datastart as integer 
     17                     
     18                    //We need to decode the packet to figure out the values 
     19                     
     20                    //First we need to make sure we have enough data 
     21                    //If not we need to wait for more 
     22                     
     23                    flagstart = InStrb(buffer, ChrB(&h5A)) 
     24                     
     25                    if flagstart = 0 then 
     26                      //We did not find a match so we can discard the data and wait for more 
     27                      buffer =  "" 
     28                      return 
     29                    ElseIf lenb(buffer) < 17 + flagStart - 1 then 
     30                      // we do not have a complete packet return and wait 
     31                      return 
     32                    end if 
     33                     
     34                    datastart = flagstart + 1 
     35                     
     36                    byte03 = midb(buffer, datastart, 1) 
     37                    byte04 = midb(buffer, datastart+1, 1) 
     38                    byte05 = midb(buffer, datastart+2, 1) 
     39                    byte06 = midb(buffer, datastart+3, 1) 
     40                    byte07 = midb(buffer, datastart+4, 1) 
     41                    byte08 = midb(buffer, datastart+5, 1) 
     42                    byte09 = midb(buffer, datastart+6, 1) 
     43                    byte10 = midb(buffer, datastart+7, 1) 
     44                    byte11 = midb(buffer, datastart+8, 1) 
     45                    byte12 = midb(buffer, datastart+9, 1) 
     46                    byte13 = midb(buffer, datastart+10, 1) 
     47                    byte14 = midb(buffer, datastart+11, 1) 
     48                    byte15 = midb(buffer, datastart+12, 1) 
     49                    byte16 = midb(buffer, datastart+13, 1) 
     50                    byte17 = midb(buffer, datastart+14, 1) 
     51                     
     52                    valuesChanged() 
    8053                     
    8154                  else 
    82                     //default thing to do 
    83                     MsgBox "Error invalid car type" 
    84                     return 
     55                     
     56                    //We do not care about the data, discard it 
     57                    buffer = "" 
     58                     
    8559                  end select 
    86                    
    87                   //trigger the event definition so main program knows the values changed 
    88                   valuesChanged() 
    89                 End Sub 
    90         #tag EndMethod 
    91  
    92         #tag Method, Flags = &h0 
    93                 Sub setCarType(value as string) 
    94                   //When setting car type we must reconfigure the serial port 
    95                   //Some car types have a different baud rate 
    96                    
    97                   select case value 
    98                      
    99                   case "MR-03" 
    100                     carType = value 
    101                     byte15 = chrb(&h05) 
    102                     byte16 = chrb(&h5A) 
    103                     byte17 = chrb(&h3C) 
    104                   case "dNaNo" 
    105                     carType = value 
    106                     byte15 = chrb(&hFF) 
    107                     byte16 = chrb(&h80) 
    108                     byte17 = chrb(&h80) 
    109                   case "ASF" 
    110                     carType = value 
    111                     byte15 = chrb(&hFF) 
    112                     byte16 = chrb(&hFF) 
    113                     byte17 = chrb(&hFF) 
    114                      
    115                   else 
    116                     MsgBox "Error setting Car Type" 
    117                   end select 
    118                    
    119                   valuesChanged() 
    120                 End Sub 
    121         #tag EndMethod 
    122  
    123         #tag Method, Flags = &h0 
    124                 Sub writeCar() 
    125                   //Send set bytes to the car 
    126                   mode = "write" 
    127                    
    128                   dim sendstring as string 
    129                    
    130                   calculateChecksum() 
    131                    
    132                   sendstring = byte01 + byte02 + byte03 + byte04 + byte05 + byte06 + byte07 + byte08 + byte09 + byte10 + byte11 + byte12 + byte13 + byte14 + byte15 + byte16 + byte17 + byte18 
    133                    
    134                   me.Write(sendstring) 
    135                 End Sub 
    136         #tag EndMethod 
     60                End Sub 
     61        #tag EndEvent 
     62 
    13763 
    13864        #tag Method, Flags = &h0 
     
    16086                   
    16187                  byte18 = chrb(i) 
    162                 End Sub 
    163         #tag EndMethod 
    164  
    165         #tag Method, Flags = &h0 
    166                 Sub readCar() 
    167                   //Read values from the currently attached car 
    168                   dim sendstring as string 
    169                    
    170                   mode = "read" 
    171                    
    172                   sendstring = chrb(&hC5) 
    173                    
    174                   me.Write(sendstring) 
    17588                End Sub 
    17689        #tag EndMethod 
     
    214127                  carType = "MR-03" 
    215128                End Sub 
    216         #tag EndMethod 
    217  
    218         #tag Method, Flags = &h21 
    219                 Private Function prepareDB() As Boolean 
    220                   //Open the database file 
    221                   fsicsdb = new REALSQLDatabase 
    222                   dim f as FolderItem = GetFolderItem("fsicsdb") 
    223                   fsicsdb.DatabaseFile = f 
    224                    
    225                   return f.Exists 
    226                 End Function 
    227129        #tag EndMethod 
    228130 
     
    327229                    MsgBox "Please select a profile to delete" 
    328230                     
    329                   end if 
    330                 End Sub 
    331         #tag EndMethod 
    332  
    333         #tag Method, Flags = &h0 
    334                 Sub saveProfile(theName as String) 
    335                   if theName <> "" then 
    336                      
    337                     dim rs as RecordSet 
    338                     dim status as Boolean 
    339                      
    340                     //Find a record 
    341                     rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
    342                      
    343                     //Make sure we got a record 
    344                     if rs <> nil then 
    345                       //delete the record before saving 
    346                       deleteProfile(theName) 
    347                     end if 
    348                      
    349                     rs.Close 
    350                      
    351                     status = createProfile(theName) 
    352                      
    353                   else 
    354                      
    355                     MsgBox "Please select a profile to modify" 
    356                      
    357                   end if 
    358                 End Sub 
    359         #tag EndMethod 
    360  
    361         #tag Method, Flags = &h0 
    362                 Function listProfiles() As String() 
    363                   dim rs as RecordSet 
    364                   dim s() as string 
    365                    
    366                   //Find records 
    367                   rs = fsicsdb.SQLSelect("SELECT name FROM carprofiles") 
    368                    
    369                   if rs <> nil then 
    370                      
    371                     while rs.EOF = false 
    372                       s.Append rs.Field("name").StringValue 
    373                       rs.MoveNext 
    374                     wend 
    375                      
    376                   end if 
    377                    
    378                   rs.Close 
    379                   Return s() 
    380                 End Function 
    381         #tag EndMethod 
    382  
    383         #tag Method, Flags = &h0 
    384                 Sub loadProfile(theName as string) 
    385                   //Find the profile in the database, update the bytes and fire the event 
    386                   dim rs as RecordSet 
    387                    
    388                   rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
    389                    
    390                   //Make sure we got a record to work with 
    391                   if rs <> Nil then 
    392                      
    393                     if rs.Field("cartype").StringValue <> "" then 
    394                       carType = rs.Field("cartype").StringValue 
    395                     end if 
    396                      
    397                     if rs.Field("byte01").StringValue <> "" then 
    398                       byte01 = chrb(rs.Field("byte01").IntegerValue) 
    399                     end if 
    400                     if rs.Field("byte02").StringValue <> "" then 
    401                       byte02 = chrb(rs.Field("byte02").IntegerValue) 
    402                     end if 
    403                     if rs.Field("byte03").StringValue <> "" then 
    404                       byte03 = chrb(rs.Field("byte03").IntegerValue) 
    405                     end if 
    406                     if rs.Field("byte04").StringValue <> "" then 
    407                       byte04 = chrb(rs.Field("byte04").IntegerValue) 
    408                     end if 
    409                     if rs.Field("byte05").StringValue <> "" then 
    410                       byte05 = chrb(rs.Field("byte05").IntegerValue) 
    411                     end if 
    412                     if rs.Field("byte06").StringValue <> "" then 
    413                       byte06 = chrb(rs.Field("byte06").IntegerValue) 
    414                     end if 
    415                     if rs.Field("byte07").StringValue <> "" then 
    416                       byte07 = chrb(rs.Field("byte07").IntegerValue) 
    417                     end if 
    418                     if rs.Field("byte08").StringValue <> "" then 
    419                       byte08 = chrb(rs.Field("byte08").IntegerValue) 
    420                     end if 
    421                     if rs.Field("byte09").StringValue <> "" then 
    422                       byte09 = chrb(rs.Field("byte09").IntegerValue) 
    423                     end if 
    424                     if rs.Field("byte10").StringValue <> "" then 
    425                       byte10 = chrb(rs.Field("byte10").IntegerValue) 
    426                     end if 
    427                     if rs.Field("byte11").StringValue <> "" then 
    428                       byte11 = chrb(rs.Field("byte11").IntegerValue) 
    429                     end if 
    430                     if rs.Field("byte12").StringValue <> "" then 
    431                       byte12 = chrb(rs.Field("byte12").IntegerValue) 
    432                     end if 
    433                     if rs.Field("byte13").StringValue <> "" then 
    434                       byte13 = chrb(rs.Field("byte13").IntegerValue) 
    435                     end if 
    436                     if rs.Field("byte14").StringValue <> "" then 
    437                       byte14 = chrb(rs.Field("byte14").IntegerValue) 
    438                     end if 
    439                     if rs.Field("byte15").StringValue <> "" then 
    440                       byte15 = chrb(rs.Field("byte15").IntegerValue) 
    441                     end if 
    442                     if rs.Field("byte16").StringValue <> "" then 
    443                       byte16 = chrb(rs.Field("byte16").IntegerValue) 
    444                     end if 
    445                     if rs.Field("byte17").StringValue <> "" then 
    446                       byte17 = chrb(rs.Field("byte17").IntegerValue) 
    447                     end if 
    448                     if rs.Field("byte18").StringValue <> "" then 
    449                       byte18 = chrb(rs.Field("byte18").IntegerValue) 
    450                     end if 
    451                      
    452                     valuesChanged() 
    453231                  end if 
    454232                End Sub 
     
    678456        #tag EndMethod 
    679457 
     458        #tag Method, Flags = &h0 
     459                Function listProfiles() As String() 
     460                  dim rs as RecordSet 
     461                  dim s() as string 
     462                   
     463                  //Find records 
     464                  rs = fsicsdb.SQLSelect("SELECT name FROM carprofiles") 
     465                   
     466                  if rs <> nil then 
     467                     
     468                    while rs.EOF = false 
     469                      s.Append rs.Field("name").StringValue 
     470                      rs.MoveNext 
     471                    wend 
     472                     
     473                  end if 
     474                   
     475                  rs.Close 
     476                  Return s() 
     477                End Function 
     478        #tag EndMethod 
     479 
     480        #tag Method, Flags = &h0 
     481                Sub loadProfile(theName as string) 
     482                  //Find the profile in the database, update the bytes and fire the event 
     483                  dim rs as RecordSet 
     484                   
     485                  rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
     486                   
     487                  //Make sure we got a record to work with 
     488                  if rs <> Nil then 
     489                     
     490                    if rs.Field("cartype").StringValue <> "" then 
     491                      carType = rs.Field("cartype").StringValue 
     492                    end if 
     493                     
     494                    if rs.Field("byte01").StringValue <> "" then 
     495                      byte01 = chrb(rs.Field("byte01").IntegerValue) 
     496                    end if 
     497                    if rs.Field("byte02").StringValue <> "" then 
     498                      byte02 = chrb(rs.Field("byte02").IntegerValue) 
     499                    end if 
     500                    if rs.Field("byte03").StringValue <> "" then 
     501                      byte03 = chrb(rs.Field("byte03").IntegerValue) 
     502                    end if 
     503                    if rs.Field("byte04").StringValue <> "" then 
     504                      byte04 = chrb(rs.Field("byte04").IntegerValue) 
     505                    end if 
     506                    if rs.Field("byte05").StringValue <> "" then 
     507                      byte05 = chrb(rs.Field("byte05").IntegerValue) 
     508                    end if 
     509                    if rs.Field("byte06").StringValue <> "" then 
     510                      byte06 = chrb(rs.Field("byte06").IntegerValue) 
     511                    end if 
     512                    if rs.Field("byte07").StringValue <> "" then 
     513                      byte07 = chrb(rs.Field("byte07").IntegerValue) 
     514                    end if 
     515                    if rs.Field("byte08").StringValue <> "" then 
     516                      byte08 = chrb(rs.Field("byte08").IntegerValue) 
     517                    end if 
     518                    if rs.Field("byte09").StringValue <> "" then 
     519                      byte09 = chrb(rs.Field("byte09").IntegerValue) 
     520                    end if 
     521                    if rs.Field("byte10").StringValue <> "" then 
     522                      byte10 = chrb(rs.Field("byte10").IntegerValue) 
     523                    end if 
     524                    if rs.Field("byte11").StringValue <> "" then 
     525                      byte11 = chrb(rs.Field("byte11").IntegerValue) 
     526                    end if 
     527                    if rs.Field("byte12").StringValue <> "" then 
     528                      byte12 = chrb(rs.Field("byte12").IntegerValue) 
     529                    end if 
     530                    if rs.Field("byte13").StringValue <> "" then 
     531                      byte13 = chrb(rs.Field("byte13").IntegerValue) 
     532                    end if 
     533                    if rs.Field("byte14").StringValue <> "" then 
     534                      byte14 = chrb(rs.Field("byte14").IntegerValue) 
     535                    end if 
     536                    if rs.Field("byte15").StringValue <> "" then 
     537                      byte15 = chrb(rs.Field("byte15").IntegerValue) 
     538                    end if 
     539                    if rs.Field("byte16").StringValue <> "" then 
     540                      byte16 = chrb(rs.Field("byte16").IntegerValue) 
     541                    end if 
     542                    if rs.Field("byte17").StringValue <> "" then 
     543                      byte17 = chrb(rs.Field("byte17").IntegerValue) 
     544                    end if 
     545                    if rs.Field("byte18").StringValue <> "" then 
     546                      byte18 = chrb(rs.Field("byte18").IntegerValue) 
     547                    end if 
     548                     
     549                    valuesChanged() 
     550                  end if 
     551                End Sub 
     552        #tag EndMethod 
     553 
     554        #tag Method, Flags = &h21 
     555                Private Function prepareDB() As Boolean 
     556                  //Open the database file 
     557                  fsicsdb = new REALSQLDatabase 
     558                  dim f as FolderItem = GetFolderItem("fsicsdb") 
     559                  fsicsdb.DatabaseFile = f 
     560                   
     561                  return f.Exists 
     562                End Function 
     563        #tag EndMethod 
     564 
     565        #tag Method, Flags = &h0 
     566                Sub readCar() 
     567                  //Read values from the currently attached car 
     568                  dim sendstring as string 
     569                   
     570                  mode = "read" 
     571                   
     572                  sendstring = chrb(&hC5) 
     573                   
     574                  me.Write(sendstring) 
     575                End Sub 
     576        #tag EndMethod 
     577 
     578        #tag Method, Flags = &h0 
     579                Sub resetCar() 
     580                  //This sends the command to reset the car back to a default configuration 
     581                  //Defaults are different for each car type 
     582                  setDefaultValues 
     583                   
     584                  //Send the default values to the car 
     585                  writeCar 
     586                End Sub 
     587        #tag EndMethod 
     588 
     589        #tag Method, Flags = &h0 
     590                Sub saveProfile(theName as String) 
     591                  if theName <> "" then 
     592                     
     593                    dim rs as RecordSet 
     594                    dim status as Boolean 
     595                     
     596                    //Find a record 
     597                    rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
     598                     
     599                    //Make sure we got a record 
     600                    if rs <> nil then 
     601                      //delete the record before saving 
     602                      deleteProfile(theName) 
     603                    end if 
     604                     
     605                    rs.Close 
     606                     
     607                    status = createProfile(theName) 
     608                     
     609                  else 
     610                     
     611                    MsgBox "Please select a profile to modify" 
     612                     
     613                  end if 
     614                End Sub 
     615        #tag EndMethod 
     616 
     617        #tag Method, Flags = &h0 
     618                Sub setCarType(value as string) 
     619                  //When setting car type we must reconfigure the serial port 
     620                  //Some car types have a different baud rate 
     621                   
     622                  select case value 
     623                     
     624                  case "MR-03" 
     625                    carType = value 
     626                    byte15 = chrb(&h05) 
     627                    byte16 = chrb(&h5A) 
     628                    byte17 = chrb(&h3C) 
     629                  case "dNaNo" 
     630                    carType = value 
     631                    byte15 = chrb(&hFF) 
     632                    byte16 = chrb(&h80) 
     633                    byte17 = chrb(&h80) 
     634                  case "ASF" 
     635                    carType = value 
     636                    byte15 = chrb(&hFF) 
     637                    byte16 = chrb(&hFF) 
     638                    byte17 = chrb(&hFF) 
     639                     
     640                  else 
     641                    MsgBox "Error setting Car Type" 
     642                  end select 
     643                   
     644                  valuesChanged() 
     645                End Sub 
     646        #tag EndMethod 
     647 
     648        #tag Method, Flags = &h0 
     649                Sub setDefaultValues() 
     650                  //Set the defaults for the bytes sent to a car 
     651                   
     652                  select case carType 
     653                     
     654                  case "MR-03" 
     655                    byte01 = chrb(&hD5) 
     656                    byte02 = chrb(&h5A) 
     657                    byte03 = chrb(&h64) 
     658                    byte04 = chrb(&hFF) 
     659                    byte05 = chrb(&h02) 
     660                    byte06 = chrb(&h02) 
     661                    byte07 = chrb(&h01) 
     662                    byte08 = chrb(&hFF) 
     663                    byte09 = chrb(&hBC) 
     664                    byte10 = chrb(&h44) 
     665                    byte11 = chrb(&h88) 
     666                    byte12 = chrb(&h78) 
     667                    byte13 = chrb(&hFF) 
     668                    byte14 = chrb(&h2C) 
     669                    byte15 = chrb(&h05) 
     670                    byte16 = chrb(&h5A) 
     671                    byte17 = chrb(&h3C) 
     672                    byte18 = chrb(&h87) 
     673                     
     674                  case "dNaNo" 
     675                    byte01 = chrb(&hD5) 
     676                    byte02 = chrb(&h5A) 
     677                    byte03 = chrb(&hFF) 
     678                    byte04 = chrb(&hFF) 
     679                    byte05 = chrb(&h0A) 
     680                    byte06 = chrb(&h03) 
     681                    byte07 = chrb(&h01) 
     682                    byte08 = chrb(&h40) 
     683                    byte09 = chrb(&hBC) 
     684                    byte10 = chrb(&h44) 
     685                    byte11 = chrb(&h88) 
     686                    byte12 = chrb(&h78) 
     687                    byte13 = chrb(&h03) 
     688                    byte14 = chrb(&hFF) 
     689                    byte15 = chrb(&hFF) 
     690                    byte16 = chrb(&h80) 
     691                    byte17 = chrb(&h80) 
     692                    byte18 = chrb(&hA7) 
     693                     
     694                  case "ASF" 
     695                    byte01 = chrb(&hD5) 
     696                    byte02 = chrb(&h5A) 
     697                    byte03 = chrb(&hFF) 
     698                    byte04 = chrb(&hFF) 
     699                    byte05 = chrb(&h0A) 
     700                    byte06 = chrb(&h03) 
     701                    byte07 = chrb(&h01) 
     702                    byte08 = chrb(&h78) 
     703                    byte09 = chrb(&hBC) 
     704                    byte10 = chrb(&h44) 
     705                    byte11 = chrb(&h88) 
     706                    byte12 = chrb(&h78) 
     707                    byte13 = chrb(&h03) 
     708                    byte14 = chrb(&hFF) 
     709                    byte15 = chrb(&hFF) 
     710                    byte16 = chrb(&hFF) 
     711                    byte17 = chrb(&hFF) 
     712                    byte18 = chrb(&hDD) 
     713                     
     714                  else 
     715                    //default thing to do 
     716                    MsgBox "Error invalid car type" 
     717                    return 
     718                  end select 
     719                   
     720                  //trigger the event definition so main program knows the values changed 
     721                  valuesChanged() 
     722                End Sub 
     723        #tag EndMethod 
     724 
     725        #tag Method, Flags = &h0 
     726                Sub writeCar() 
     727                  //Send set bytes to the car 
     728                  mode = "write" 
     729                   
     730                  dim sendstring as string 
     731                   
     732                  calculateChecksum() 
     733                   
     734                  sendstring = byte01 + byte02 + byte03 + byte04 + byte05 + byte06 + byte07 + byte08 + byte09 + byte10 + byte11 + byte12 + byte13 + byte14 + byte15 + byte16 + byte17 + byte18 
     735                   
     736                  me.Write(sendstring) 
     737                End Sub 
     738        #tag EndMethod 
     739 
     740 
     741        #tag Hook, Flags = &h0 
     742                Event profileImported(profileName as string) 
     743        #tag EndHook 
    680744 
    681745        #tag Hook, Flags = &h0 
    682746                Event valuesChanged() 
    683         #tag EndHook 
    684  
    685         #tag Hook, Flags = &h0 
    686                 Event profileImported(profileName as string) 
    687747        #tag EndHook 
    688748 
     
    713773                You should have received a copy of the GNU General Public License 
    714774                along with Flip Side ICS Software.  If not, see <http://www.gnu.org/licenses/>. 
    715                  
    716775        #tag EndNote 
    717776 
    718777 
     778        #tag Property, Flags = &h21 
     779                Private buffer As String 
     780        #tag EndProperty 
     781 
    719782        #tag Property, Flags = &h0 
    720783                byte01 As String 
     
    722785 
    723786        #tag Property, Flags = &h0 
     787                byte02 As String 
     788        #tag EndProperty 
     789 
     790        #tag Property, Flags = &h0 
     791                byte03 As String 
     792        #tag EndProperty 
     793 
     794        #tag Property, Flags = &h0 
     795                byte04 As String 
     796        #tag EndProperty 
     797 
     798        #tag Property, Flags = &h0 
     799                byte05 As String 
     800        #tag EndProperty 
     801 
     802        #tag Property, Flags = &h0 
     803                byte06 As String 
     804        #tag EndProperty 
     805 
     806        #tag Property, Flags = &h0 
     807                byte07 As String 
     808        #tag EndProperty 
     809 
     810        #tag Property, Flags = &h0 
     811                byte08 As String 
     812        #tag EndProperty 
     813 
     814        #tag Property, Flags = &h0 
     815                byte09 As String 
     816        #tag EndProperty 
     817 
     818        #tag Property, Flags = &h0 
     819                byte10 As String 
     820        #tag EndProperty 
     821 
     822        #tag Property, Flags = &h0 
    724823                byte11 As String 
    725824        #tag EndProperty 
     
    753852        #tag EndProperty 
    754853 
    755         #tag Property, Flags = &h0 
    756                 byte02 As String 
    757         #tag EndProperty 
    758  
    759         #tag Property, Flags = &h0 
    760                 byte03 As String 
    761         #tag EndProperty 
    762  
    763         #tag Property, Flags = &h0 
    764                 byte04 As String 
    765         #tag EndProperty 
    766  
    767         #tag Property, Flags = &h0 
    768                 byte05 As String 
    769         #tag EndProperty 
    770  
    771         #tag Property, Flags = &h0 
    772                 byte06 As String 
    773         #tag EndProperty 
    774  
    775         #tag Property, Flags = &h0 
    776                 byte07 As String 
    777         #tag EndProperty 
    778  
    779         #tag Property, Flags = &h0 
    780                 byte08 As String 
    781         #tag EndProperty 
    782  
    783         #tag Property, Flags = &h0 
    784                 byte09 As String 
    785         #tag EndProperty 
    786  
    787         #tag Property, Flags = &h0 
    788                 byte10 As String 
    789         #tag EndProperty 
    790  
    791         #tag Property, Flags = &h0 
    792                 carType As String = "MR-03" 
     854        #tag Property, Flags = &h21 
     855                Private carType As String = "MR-03" 
    793856        #tag EndProperty 
    794857 
     
    797860        #tag EndProperty 
    798861 
    799         #tag Property, Flags = &h0 
    800                 mode As String = "none" 
     862        #tag Property, Flags = &h21 
     863                Private mode As String = "none" 
    801864        #tag EndProperty 
    802865 
    803866 
    804867        #tag ViewBehavior 
    805                 #tag ViewProperty 
    806                         Name="Name" 
    807                         Visible=true 
    808                         Group="ID" 
    809                         InheritedFrom="serial" 
    810                 #tag EndViewProperty 
    811                 #tag ViewProperty 
    812                         Name="Index" 
    813                         Visible=true 
    814                         Group="ID" 
    815                         Type="Integer" 
    816                         InheritedFrom="serial" 
    817                 #tag EndViewProperty 
    818                 #tag ViewProperty 
    819                         Name="Super" 
    820                         Visible=true 
    821                         Group="ID" 
    822                         InheritedFrom="serial" 
    823                 #tag EndViewProperty 
    824                 #tag ViewProperty 
    825                         Name="Left" 
    826                         Visible=true 
    827                         Group="Position" 
    828                         InheritedFrom="serial" 
    829                 #tag EndViewProperty 
    830                 #tag ViewProperty 
    831                         Name="Top" 
    832                         Visible=true 
    833                         Group="Position" 
    834                         InheritedFrom="serial" 
    835                 #tag EndViewProperty 
    836868                #tag ViewProperty 
    837869                        Name="Baud" 
     
    877909                #tag EndViewProperty 
    878910                #tag ViewProperty 
     911                        Name="byte01" 
     912                        Group="Behavior" 
     913                        InitialValue="&hFF" 
     914                        Type="String" 
     915                        EditorType="MultiLineEditor" 
     916                #tag EndViewProperty 
     917                #tag ViewProperty 
     918                        Name="byte02" 
     919                        Group="Behavior" 
     920                        Type="String" 
     921                        EditorType="MultiLineEditor" 
     922                #tag EndViewProperty 
     923                #tag ViewProperty 
     924                        Name="byte03" 
     925                        Group="Behavior" 
     926                        Type="String" 
     927                        EditorType="MultiLineEditor" 
     928                #tag EndViewProperty 
     929                #tag ViewProperty 
     930                        Name="byte04" 
     931                        Group="Behavior" 
     932                        Type="String" 
     933                        EditorType="MultiLineEditor" 
     934                #tag EndViewProperty 
     935                #tag ViewProperty 
     936                        Name="byte05" 
     937                        Group="Behavior" 
     938                        Type="String" 
     939                        EditorType="MultiLineEditor" 
     940                #tag EndViewProperty 
     941                #tag ViewProperty 
     942                        Name="byte06" 
     943                        Group="Behavior" 
     944                        Type="String" 
     945                        EditorType="MultiLineEditor" 
     946                #tag EndViewProperty 
     947                #tag ViewProperty 
     948                        Name="byte07" 
     949                        Group="Behavior" 
     950                        Type="String" 
     951                        EditorType="MultiLineEditor" 
     952                #tag EndViewProperty 
     953                #tag ViewProperty 
     954                        Name="byte08" 
     955                        Group="Behavior" 
     956                        Type="String" 
     957                        EditorType="MultiLineEditor" 
     958                #tag EndViewProperty 
     959                #tag ViewProperty 
     960                        Name="byte09" 
     961                        Group="Behavior" 
     962                        Type="String" 
     963                        EditorType="MultiLineEditor" 
     964                #tag EndViewProperty 
     965                #tag ViewProperty 
     966                        Name="byte10" 
     967                        Group="Behavior" 
     968                        Type="String" 
     969                        EditorType="MultiLineEditor" 
     970                #tag EndViewProperty 
     971                #tag ViewProperty 
     972                        Name="byte11" 
     973                        Group="Behavior" 
     974                        Type="String" 
     975                        EditorType="MultiLineEditor" 
     976                #tag EndViewProperty 
     977                #tag ViewProperty 
     978                        Name="byte12" 
     979                        Group="Behavior" 
     980                        Type="String" 
     981                        EditorType="MultiLineEditor" 
     982                #tag EndViewProperty 
     983                #tag ViewProperty 
     984                        Name="byte13" 
     985                        Group="Behavior" 
     986                        Type="String" 
     987                        EditorType="MultiLineEditor" 
     988                #tag EndViewProperty 
     989                #tag ViewProperty 
     990                        Name="byte14" 
     991                        Group="Behavior" 
     992                        Type="String" 
     993                        EditorType="MultiLineEditor" 
     994                #tag EndViewProperty 
     995                #tag ViewProperty 
     996                        Name="byte15" 
     997                        Group="Behavior" 
     998                        Type="String" 
     999                        EditorType="MultiLineEditor" 
     1000                #tag EndViewProperty 
     1001                #tag ViewProperty 
     1002                        Name="byte16" 
     1003                        Group="Behavior" 
     1004                        Type="String" 
     1005                        EditorType="MultiLineEditor" 
     1006                #tag EndViewProperty 
     1007                #tag ViewProperty 
     1008                        Name="byte17" 
     1009                        Group="Behavior" 
     1010                        Type="String" 
     1011                        EditorType="MultiLineEditor" 
     1012                #tag EndViewProperty 
     1013                #tag ViewProperty 
     1014                        Name="byte18" 
     1015                        Group="Behavior" 
     1016                        Type="String" 
     1017                        EditorType="MultiLineEditor" 
     1018                #tag EndViewProperty 
     1019                #tag ViewProperty 
     1020                        Name="carType" 
     1021                        Group="Behavior" 
     1022                        InitialValue="MR-03" 
     1023                        Type="String" 
     1024                        EditorType="MultiLineEditor" 
     1025                #tag EndViewProperty 
     1026                #tag ViewProperty 
     1027                        Name="CTS" 
     1028                        Visible=true 
     1029                        Group="Behavior" 
     1030                        Type="Boolean" 
     1031                        InheritedFrom="serial" 
     1032                #tag EndViewProperty 
     1033                #tag ViewProperty 
     1034                        Name="DTR" 
     1035                        Visible=true 
     1036                        Group="Behavior" 
     1037                        Type="Boolean" 
     1038                        InheritedFrom="serial" 
     1039                #tag EndViewProperty 
     1040                #tag ViewProperty 
     1041                        Name="Index" 
     1042                        Visible=true 
     1043                        Group="ID" 
     1044                        Type="Integer" 
     1045                        InheritedFrom="serial" 
     1046                #tag EndViewProperty 
     1047                #tag ViewProperty 
     1048                        Name="Left" 
     1049                        Visible=true 
     1050                        Group="Position" 
     1051                        InheritedFrom="serial" 
     1052                #tag EndViewProperty 
     1053                #tag ViewProperty 
     1054                        Name="mode" 
     1055                        Group="Behavior" 
     1056                        InitialValue="read" 
     1057                        Type="String" 
     1058                        EditorType="MultiLineEditor" 
     1059                #tag EndViewProperty 
     1060                #tag ViewProperty 
     1061                        Name="Name" 
     1062                        Visible=true 
     1063                        Group="ID" 
     1064                        InheritedFrom="serial" 
     1065                #tag EndViewProperty 
     1066                #tag ViewProperty 
    8791067                        Name="Parity" 
    8801068                        Visible=true 
     
    9051093                #tag EndViewProperty 
    9061094                #tag ViewProperty 
     1095                        Name="Super" 
     1096                        Visible=true 
     1097                        Group="ID" 
     1098                        InheritedFrom="serial" 
     1099                #tag EndViewProperty 
     1100                #tag ViewProperty 
     1101                        Name="Top" 
     1102                        Visible=true 
     1103                        Group="Position" 
     1104                        InheritedFrom="serial" 
     1105                #tag EndViewProperty 
     1106                #tag ViewProperty 
    9071107                        Name="XON" 
    9081108                        Visible=true 
     
    9101110                        Type="Boolean" 
    9111111                        InheritedFrom="serial" 
    912                 #tag EndViewProperty 
    913                 #tag ViewProperty 
    914                         Name="CTS" 
    915                         Visible=true 
    916                         Group="Behavior" 
    917                         Type="Boolean" 
    918                         InheritedFrom="serial" 
    919                 #tag EndViewProperty 
    920                 #tag ViewProperty 
    921                         Name="DTR" 
    922                         Visible=true 
    923                         Group="Behavior" 
    924                         Type="Boolean" 
    925                         InheritedFrom="serial" 
    926                 #tag EndViewProperty 
    927                 #tag ViewProperty 
    928                         Name="byte01" 
    929                         Group="Behavior" 
    930                         InitialValue="&hFF" 
    931                         Type="String" 
    932                         EditorType="MultiLineEditor" 
    933                 #tag EndViewProperty 
    934                 #tag ViewProperty 
    935                         Name="byte11" 
    936                         Group="Behavior" 
    937                         Type="String" 
    938                         EditorType="MultiLineEditor" 
    939                 #tag EndViewProperty 
    940                 #tag ViewProperty 
    941                         Name="byte12" 
    942                         Group="Behavior" 
    943                         Type="String" 
    944                         EditorType="MultiLineEditor" 
    945                 #tag EndViewProperty 
    946                 #tag ViewProperty 
    947                         Name="byte13" 
    948                         Group="Behavior" 
    949                         Type="String" 
    950                         EditorType="MultiLineEditor" 
    951                 #tag EndViewProperty 
    952                 #tag ViewProperty 
    953                         Name="byte14" 
    954                         Group="Behavior" 
    955                         Type="String" 
    956                         EditorType="MultiLineEditor" 
    957                 #tag EndViewProperty 
    958                 #tag ViewProperty 
    959                         Name="byte15" 
    960                         Group="Behavior" 
    961                         Type="String" 
    962                         EditorType="MultiLineEditor" 
    963                 #tag EndViewProperty 
    964                 #tag ViewProperty 
    965                         Name="byte16" 
    966                         Group="Behavior" 
    967                         Type="String" 
    968                         EditorType="MultiLineEditor" 
    969                 #tag EndViewProperty 
    970                 #tag ViewProperty 
    971                         Name="byte17" 
    972                         Group="Behavior" 
    973                         Type="String" 
    974                         EditorType="MultiLineEditor" 
    975                 #tag EndViewProperty 
    976                 #tag ViewProperty 
    977                         Name="byte18" 
    978                         Group="Behavior" 
    979                         Type="String" 
    980                         EditorType="MultiLineEditor" 
    981                 #tag EndViewProperty 
    982                 #tag ViewProperty 
    983                         Name="byte02" 
    984                         Group="Behavior" 
    985                         Type="String" 
    986                         EditorType="MultiLineEditor" 
    987                 #tag EndViewProperty 
    988                 #tag ViewProperty 
    989                         Name="byte03" 
    990                         Group="Behavior" 
    991                         Type="String" 
    992                         EditorType="MultiLineEditor" 
    993                 #tag EndViewProperty 
    994                 #tag ViewProperty 
    995                         Name="byte04" 
    996                         Group="Behavior" 
    997                         Type="String" 
    998                         EditorType="MultiLineEditor" 
    999                 #tag EndViewProperty 
    1000                 #tag ViewProperty 
    1001                         Name="byte05" 
    1002                         Group="Behavior" 
    1003                         Type="String" 
    1004                         EditorType="MultiLineEditor" 
    1005                 #tag EndViewProperty 
    1006                 #tag ViewProperty 
    1007                         Name="byte06" 
    1008                         Group="Behavior" 
    1009                         Type="String" 
    1010                         EditorType="MultiLineEditor" 
    1011                 #tag EndViewProperty 
    1012                 #tag ViewProperty 
    1013                         Name="byte07" 
    1014                         Group="Behavior" 
    1015                         Type="String" 
    1016                         EditorType="MultiLineEditor" 
    1017                 #tag EndViewProperty 
    1018                 #tag ViewProperty 
    1019                         Name="byte08" 
    1020                         Group="Behavior" 
    1021                         Type="String" 
    1022                         EditorType="MultiLineEditor" 
    1023                 #tag EndViewProperty 
    1024                 #tag ViewProperty 
    1025                         Name="byte09" 
    1026                         Group="Behavior" 
    1027                         Type="String" 
    1028                         EditorType="MultiLineEditor" 
    1029                 #tag EndViewProperty 
    1030                 #tag ViewProperty 
    1031                         Name="byte10" 
    1032                         Group="Behavior" 
    1033                         Type="String" 
    1034                         EditorType="MultiLineEditor" 
    1035                 #tag EndViewProperty 
    1036                 #tag ViewProperty 
    1037                         Name="carType" 
    1038                         Group="Behavior" 
    1039                         InitialValue="MR-03" 
    1040                         Type="String" 
    1041                 #tag EndViewProperty 
    1042                 #tag ViewProperty 
    1043                         Name="mode" 
    1044                         Group="Behavior" 
    1045                         InitialValue="read" 
    1046                         Type="String" 
    10471112                #tag EndViewProperty 
    10481113        #tag EndViewBehavior 
  • trunk/desktop/mainWindow.rbfrm

    r29 r30  
    3737      InitialParent   =   "" 
    3838      Italic          =   "" 
    39       Left            =   312 
     39      Left            =   413 
    4040      LockBottom      =   True 
    4141      LockedInPosition=   False 
     
    6767      InitialParent   =   "" 
    6868      Italic          =   "" 
    69       Left            =   412 
     69      Left            =   512 
    7070      LockBottom      =   True 
    7171      LockedInPosition=   False 
     
    7575      Scope           =   0 
    7676      TabIndex        =   5 
    77       TabPanelIndex   =   0 
    78       TabStop         =   True 
    79       TextFont        =   "System" 
    80       TextSize        =   0 
    81       TextUnit        =   0 
    82       Top             =   388 
    83       Underline       =   "" 
    84       Visible         =   True 
    85       Width           =   88 
    86    End 
    87    Begin PushButton PushButton_Reset 
    88       AutoDeactivate  =   True 
    89       Bold            =   "" 
    90       Cancel          =   "" 
    91       Caption         =   "Reset" 
    92       Default         =   "" 
    93       Enabled         =   False 
    94       Height          =   20 
    95       HelpTag         =   "" 
    96       Index           =   -2147483648 
    97       InitialParent   =   "" 
    98       Italic          =   "" 
    99       Left            =   512 
    100       LockBottom      =   True 
    101       LockedInPosition=   False 
    102       LockLeft        =   "" 
    103       LockRight       =   "" 
    104       LockTop         =   "" 
    105       Scope           =   0 
    106       TabIndex        =   6 
    10777      TabPanelIndex   =   0 
    10878      TabStop         =   True 
     
    32933263        #tag EndEvent 
    32943264#tag EndEvents 
    3295 #tag Events PushButton_Reset 
    3296         #tag Event 
    3297                 Sub Action() 
    3298                   ICSSerialPort1.resetCar 
    3299                 End Sub 
    3300         #tag EndEvent 
    3301 #tag EndEvents 
    33023265#tag Events TabPanel1 
    33033266        #tag Event 
Note: See TracChangeset for help on using the changeset viewer.