Skip to content
Snippets Groups Projects
Select Git revision
  • 84696c727df0424eff71a897243c43a6f4b82932
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

SCSI.c

Blame
    • Dean Camera's avatar
      4f114e57
      Fixed MassStorage based demos and projects resetting the SCSI sense values... · 4f114e57
      Dean Camera authored
      Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger).
      
      Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant SCSI_Codes.h file as these values are part of the MassStorage Class Driver.
      4f114e57
      History
      Fixed MassStorage based demos and projects resetting the SCSI sense values...
      Dean Camera authored
      Fixed MassStorage based demos and projects resetting the SCSI sense values before the command is executed, leading to missed SCSI sense values when the host retrieves the sense key (thanks to Martin Degelsegger).
      
      Added missing DataflashManager_CheckDataflashOperation() function to the MassStorageKeyboard demo, removed redundant SCSI_Codes.h file as these values are part of the MassStorage Class Driver.
    worker.js 1.70 KiB
    /**
     * Created by aghassaei on 1/12/15.
     */
    
    function myWorker(){
    
        //local variables
        var localEnv = null;//local variables passed in from outside
        var working = false;//boolean that says whether I'm busy or not
        var arg = null;//main data we are crunching
        var modelMesh = null;//hold on to this so we don't have to keep passing it in
    
        self.onmessage = function(e) {
            var data = e.data;
    
            if (data.url) {
                var url = data.url;
                var index = url.indexOf('index.html');//url of landing page
                if (index != -1) {
                  url = url.substring(0, index);
                }
            //load all scripts
            //    importScripts(url + 'dependencies/three.js');
        //    importScripts(url + 'js/models/dmaBeam.js');
            }
    //
            if (data.model){
                //var material = new THREE.MeshBasicMaterial({side:THREE.DoubleSide});
                //modelMesh = new THREE.Mesh(JSON.parse(data.model), material);
            }
    
            if (data.executable){
    
                if (data.localEnv){//be sure to get local environment vars before executable runs
                    localEnv = JSON.parse(data.localEnv);
                }
                if (data.arg){//be sure to get arg before executable runs
                    arg = data.arg;
                }
    
                if (working) {
                    console.log("problem here, already working on something else");
                    return;
                }
                working = true;
                eval(data.executable);
                var result = executable(arg);
                working = false;
                postMessage({result:result, isWorking:working});
            }
    
            if (data.isWorking){
                postMessage({isWorking:working});
            }
    
    
        };
    }