Ignore:
Timestamp:
12/19/12 09:04:54 (10 years ago)
Author:
AzureViolin <zhanghaotz@…>
Branches:
master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
Children:
d604d68
Parents:
42379ae
Message:

Android can now generate fly control command on the fly. With a whole lot of bugs, the screen will freeze when tap 'Manual Control'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • octave/GenerateAudioCommand/halfSineGenDirect.m

    rcb3655b r85e0208  
    11function wave = halfSineGenDirect(dir,halfPeriod_in_samples,zero,amp,sps)  
    22 
     3% generate half Sine wave, at a length of certain samples. 
     4 
    35% dir: 'u' means UP, 'd' means down. 
    4 % halfPeriod: half period of sine signal[us]. 
    5 % zero: zero level of cosine signal. 
    6 % amp: amplitude of cosine signal, in percentage.  
     6% halfPeriodi_in_samples: half period of sine signal[samples]. 
     7% zero: zero level of cosine signal. DEPRECATED 
     8% amp: amplitude of cosine signal, in percentage.DEPRECATED 
     9% sps: sampling rate.  
    710 
    811halfPeriod=halfPeriod_in_samples/sps; 
    912 
    1013bps = 16;       % bits per sample 
    11 %sps = 960000;     % sample rate [samples/s] 
    1214period = halfPeriod*2;   %period of [s] 
    1315freq = floor(sps/(halfPeriod_in_samples*2));       % frequency of the tone [Hz] 
Note: See TracChangeset for help on using the changeset viewer.