示例#1
0
文件: uprst.c 项目: uak3103/voik
int PUSKCHV(double A, double L, double R)
{
    UPRST &u=uprst;
    double va,vl,vr;

    perebroscsn(A,L,R);
    tperebrosa =Tperebros(cd[0],cd[1],cd[2],A,L,R);
    if (!RESCSN()) return 0;

//// tsarev 16.06.2013
    if (A!=999)
    {
        can_req0(fcan_kep,CAN_ABN_KEPA,CAN_CMD_STOP);
        usleep(200);
        can_req6(fcan_kep,CAN_ABN_KEPA,CAN_CMD_PUTP,m2b('M',' '),0);
        usleep(200);
    }
    if (L!=999)
    {
        can_req0(fcan_kep,CAN_ABN_KEPL,CAN_CMD_STOP);
        usleep(200);
        can_req6(fcan_kep,CAN_ABN_KEPL,CAN_CMD_PUTP,m2b('M',' '),0);
        usleep(200);
    }
    if (R!=999)
    {
        can_req0(fcan_kep,CAN_ABN_KEPR,CAN_CMD_STOP);
        usleep(200);
        can_req6(fcan_kep,CAN_ABN_KEPR,CAN_CMD_PUTP,m2b('M',' '),0);
        usleep(200);
    }
//NkadrAPOI==1 при проверке ПСИ на скорость обзора - убираем задержки 28.08.13
    if (((A!=999) || (L!=999) || (R!=999)) && (NkadrAPOI[1]>1))
    {
        delaytakt(10);
    }
//// tsarev 16.06.2013

    if (A==999) A=_cdf(OS_A);
    if (L==999) L=_cdf(OS_L);
    if (R==999) R=_cdf(OS_R);
    skorchvcsn(A,L,R,&va,&vl,&vr);

    skorcsn(va,vl,vr);

    u.chv_a=va;
    u.chv_l=vl;
    u.chv_r=vr;
    return 1;
}
示例#2
0
/*
 * Dump all memory to DASD partition
 */
void dt_dump_mem(void)
{
    unsigned long blk, addr, page;

    ccw_program_init();
    blk = device.blk_start;
    page = get_zeroed_page();

    /* Write dump header */
    writeblock(blk, __pa(dump_hdr), m2b(DF_S390_HDR_SIZE), 0);
    blk += DF_S390_HDR_SIZE / BLK_SIZE;

    /* Write memory */
    for (addr = 0; addr < dump_hdr->mem_size; addr += b2m(BLK_PWRT)) {
        writeblock(blk, addr, BLK_PWRT, page);
        progress_print(addr);
        blk += BLK_PWRT;
    }
    progress_print(addr);

    /* Write end marker */
    df_s390_em_page_init(page);
    writeblock(blk, page, 1, 0);
    free_page(page);
}
示例#3
0
文件: matrix.cpp 项目: onitake/glam
	void testMat2ConstructorAndAccessor() {
		glam::mat2 m2a(std::make_pair(M2, &M2[4]));
		TS_ASSERT_EQUALS(m2a[0][0], M2[0]);
		TS_ASSERT_EQUALS(m2a[0][1], M2[1]);
		TS_ASSERT_EQUALS(m2a[1][0], M2[2]);
		TS_ASSERT_EQUALS(m2a[1][1], M2[3]);
		glam::mat2 m2b(M2);
		TS_ASSERT_EQUALS(m2b[0][0], M2[0]);
		TS_ASSERT_EQUALS(m2b[0][1], M2[1]);
		TS_ASSERT_EQUALS(m2b[1][0], M2[2]);
		TS_ASSERT_EQUALS(m2b[1][1], M2[3]);
	}